<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello,<div class="">I’m trying to get multilevel solvers to error out when coarse levels are not converging, but I’m failing…</div><div class="">Could someone either tell me if this is not possible to do so, or help me find what the problem in my options is, please?</div><div class="">(in src/ksp/ksp/examples/tutorials)</div><div class="">$ mpirun -n 8 ./ex71 -pde_type Elasticity -cells 7,9,8 -dim 3 -pc_bddc_monolithic -pc_bddc_use_faces -pc_bddc_coarse_pc_type none -pc_bddc_coarse_ksp_type gmres -pc_bddc_coarse_ksp_converged_reason -pc_bddc_coarse_ksp_error_if_not_converged -ksp_converged_reason</div><div class="">  Linear pc_bddc_coarse_ solve did not converge due to DIVERGED_ITS iterations 1 <- I want to error out here</div><div class="">[…]</div><div class="">  Linear pc_bddc_coarse_ solve did not converge due to DIVERGED_ITS iterations 1</div><div class="">Linear solve converged due to CONVERGED_RTOL iterations 31</div><div class="">$ mpirun -np 1 ./ex1 -ksp_type gmres -pc_type gamg -ksp_converged_reason -mg_coarse_pc_type lu -mg_coarse_ksp_max_it 5 -mg_coarse_ksp_type gmres -ksp_type fgmres -mg_levels_1_ksp_type fgmres -mg_coarse_ksp_error_if_not_converged -mg_coarse_ksp_converged_reason</div><div class="">    Linear mg_coarse_ solve did not converge due to DIVERGED_ITS iterations 5  <- I want to error out here</div><div class="">[…]</div><div class="">    Linear mg_coarse_ solve did not converge due to DIVERGED_ITS iterations 5</div><div class="">Linear solve converged due to CONVERGED_RTOL iterations 3</div><div class=""><br class=""></div><div class="">This is probably linked with this SETERRQ1 <a href="https://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/interface/itfunc.c.html#line836" class="">https://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/interface/itfunc.c.html#line836</a> and the condition ksp->reason != KSP_DIVERGED_ITS.</div><div class="">If one just wants to run a fixed number of iterations, not checking for convergence, why would one set <span style="orphans: 2; widows: 2;" class="">ksp->errorifnotconverged to true?</span></div><div class=""><span style="orphans: 2; widows: 2;" class=""><br class=""></span></div><div class=""><span style="orphans: 2; widows: 2;" class="">Thanks,</span></div><div class=""><span style="orphans: 2; widows: 2;" class="">Pierre</span></div><div class=""><br class=""></div></body></html>