<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Petsc developers:</div><div>Hi,</div><div>Recently I encounter an error message, but I don't know how to solve it. I solve a problem of a system of nonlinear equations in which the coefficients of the system vary with variables. The Args are:</div><div> mpiexec -n 1 ./myprogram -snes_mf_operator -snes_view -snes_converged_reason -snes_monitor -ksp_converged_reason -ksp_monitor -ksp_rtol 0.1 -snes_rtol 1e-8 -snes_max_funcs 10000000000 -snes_max_it 10000 -pc_factor_levels 6</div><div><br></div><div>The log is :</div><div><div style="margin-left:40px"><font size="2">0 SNES Function norm 2.818062118573e+07 <br>    0 KSP Residual norm 1.967792312615e+05 <br>    1 KSP Residual norm 3.423312208841e+03 <br>  Linear solve converged due to CONVERGED_RTOL iterations 1<br>  1 SNES Function norm 2.818049788401e+07 <br>    0 KSP Residual norm 1.960830037415e+05 <br>    1 KSP Residual norm 3.458649556419e+03 <br>  Linear solve converged due to CONVERGED_RTOL iterations 1<br>Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 1<br>SNES Object: 1 MPI processes<br>  type: newtonls<br>  maximum iterations=10000, maximum function evaluations=1410065408<br>  tolerances: relative=1e-08, absolute=1e-50, solution=1e-08<br>  total number of linear solver iterations=2<br>  total number of function evaluations=27<br>  norm schedule ALWAYS<br>  SNESLineSearch Object: 1 MPI processes<br>    type: bt<br>      interpolation: cubic<br>      alpha=1.000000e-04<br>    maxstep=1.000000e+08, minlambda=1.000000e-12<br>    tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08<br>    maximum iterations=40<br>  KSP Object: 1 MPI processes<br>    type: gmres<br>      restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<br>      happy breakdown tolerance 1e-30<br>    maximum iterations=10000, initial guess is zero<br>    tolerances:  relative=0.1, absolute=1e-50, divergence=10000.<br>    left preconditioning<br>    using PRECONDITIONED norm type for convergence test<br>  PC Object: 1 MPI processes<br>    type: ilu<br>      out-of-place factorization<br>      6 levels of fill<br>      tolerance for zero pivot 2.22045e-14<br>      matrix ordering: natural<br>      factor fill ratio given 1., needed 4.29616<br>        Factored matrix follows:<br>          Mat Object: 1 MPI processes<br>            type: seqaij<br>            rows=11368, cols=11368<br>            package used to perform factorization: petsc<br>            total: nonzeros=183764, allocated nonzeros=183764<br>            total number of mallocs used during MatSetValues calls =0<br>              not using I-node routines<br>    linear system matrix followed by preconditioner matrix:<br>    Mat Object: 1 MPI processes<br>      type: mffd<br>      rows=11368, cols=11368<br>        Matrix-free approximation:<br>          err=1.49012e-08 (relative error in function evaluation)<br>          Using wp compute h routine<br>              Does not compute normU<br>    Mat Object: 1 MPI processes<br>      type: seqaij<br>      rows=11368, cols=11368<br>      total: nonzeros=42774, allocated nonzeros=56840<br>      total number of mallocs used during MatSetValues calls =0<br>        not using I-node routines<br></font><br></div></div><div><br></div><div>I don't know what causes Line_Search to diverge.</div><div>The Ksp_rtol setting in the program is very small because I find that linear-step convergence is not good.</div><div><br></div><div>My best wishes for Christmas,</div><div>Yingjie<br></div></div></div></div></div>