<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div>  Can you please run with also the options -ts_monitor -ts_adapt_monitor ?<div><br></div><div>  The output is confusing because it prints that the Nonlinear solve has converged but then <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">TSStep has failed due to DIVERGED_STEP_REJECTED which seems contradictory</span></div><div><font face="Calibri, Arial, Helvetica, sans-serif" size="3"><span style="background-color: rgb(255, 255, 255);"><br></span></font></div><div><font face="Calibri, Arial, Helvetica, sans-serif" size="3"><span style="background-color: rgb(255, 255, 255);"><br></span></font><div><br><blockquote type="cite"><div>On Feb 17, 2023, at 12:09 PM, Tu, Jiannan <Jiannan_Tu@uml.edu> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">My code uses TS to solve a set of multi-fluid MHD equations. The jacobian is provided with function F(t, u, u'). Both linear and nonlinear solvers converge but snes repeats itself until gets "TSStep has failed due to diverged_step_rejected."<span class="Apple-converted-space"> </span><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Is it because I used TSStep rather than TSSolve? I have checked the condition number. The condition number with pc_type asm is about 1 (without precondition it is about 4x10^4). The maximum ratio of off-diagonal jacobian element over diagonal element is about 21.</div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Could you help me to identify what is going wrong?</div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Thank you very much!</div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Jiannan<br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">---------------------------------------------------------------------------------------------------<br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Run command with options<br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div style="color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); font-family: "Droid Sans Mono", monospace, monospace; font-weight: normal; font-size: 14px; line-height: 19px;"><span><span class="ContentPasted1">mpiexec -n<span class="Apple-converted-space"> </span></span><span class="ContentPasted1" style="color: rgb(119, 119, 119);">$</span><span class="ContentPasted1" style="color: rgb(122, 62, 157);">1</span><span class="ContentPasted1"> ./iditm3d -ts_type arkimex -snes_tyep ngmres -ksp_type gmres -pc_type asm \</span></span></div><div style="color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); font-family: "Droid Sans Mono", monospace, monospace; font-weight: normal; font-size: 14px; line-height: 19px;"><div><span class="ContentPasted1">-ts_rtol 1.0e-4 -ts_atol 1.0e-4 -snes_monitor -snes_rtol 1.0e-4 -snes_atol 1.0e-4 \</span></div><span><span class="ContentPasted1">-snes_converged_reason</span></span></div><br></div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">The output message is </div><div class="elementToProof ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></div><div class="elementToProof ContentPasted0 ContentPasted3" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div style="color: rgb(51, 51, 51); background-color: rgb(245, 245, 245); font-family: "Droid Sans Mono", monospace, monospace; font-weight: normal; font-size: 14px; line-height: 19px;"><span><span class="ContentPasted2"></span></span></div>Start time advancing ...<div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.673091274668e-03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 8.715428433630e-02<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 4.995727626692e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    2 SNES Function norm 5.498018152230e-08<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2</div><div class="ContentPasted3">    0 SNES Function norm 3.237461568254e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 7.988531005091e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    2 SNES Function norm 1.280948196292e-07<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 4.881903203545e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 7.562592690785e-02<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.143078818923e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    2 SNES Function norm 9.834547907735e-09<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2</div><div class="ContentPasted3">    0 SNES Function norm 2.683968949758e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.838028436639e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    2 SNES Function norm 9.470813523140e-09<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.821562431175e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 1.005443458812e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 3.633336946661e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 1.515368382715e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 3.389298316830e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 4.541003359206e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 1.713800906043e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.179958172167e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.020265094117e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.513971290464e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 6.090269704320e-06<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.136603895703e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.877474016012e-06<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 3.127812462507e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.713146825704e-06<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.793512213059e-06<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.205196267430e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.572653773308e-06<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 3.260057361977e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.705816087598e-06<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.764855860446e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.212505522844e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.958996472386e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 3.273222034162e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.994512887620e-05<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072186e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 3.317240589134e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.213246532918e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.799468604767e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 3.274570888397e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 3.066048050994e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072189e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.653507278572e-03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.213869585841e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.177156902895e-03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 3.275136370365e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.962849131557e-03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473072218e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 5.664907315679e-03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.223208399368e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 5.688863091415e-03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 3.287121218919e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 4.085338521320e-03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.274473071968e+03<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 4.694691905235e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 2.211786508657e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 1.503497433939e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">    0 SNES Function norm 3.272667798977e-01<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">    1 SNES Function norm 2.176132327279e-04<span class="Apple-converted-space"> </span></div><div class="ContentPasted3">  Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1</div><div class="ContentPasted3">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div><div class="ContentPasted3">[0]PETSC ERROR:  <span class="Apple-converted-space"> </span></div><div class="ContentPasted3">[0]PETSC ERROR: TSStep has failed due to DIVERGED_STEP_REJECTED</div><div class="ContentPasted3">[0]PETSC ERROR: See<span class="Apple-converted-space"> </span><a href="https://petsc.org/release/faq/">https://petsc.org/release/faq/</a><span class="Apple-converted-space"> </span>for trouble shooting.</div><div class="ContentPasted3">[0]PETSC ERROR: Petsc Release Version 3.16.6, Mar 30, 2022</div><div class="ContentPasted3">[0]PETSC ERROR: ./iditm3d on a  named office by jtu Fri Feb 17 11:59:43 2023</div><div class="ContentPasted3">[0]PETSC ERROR: Configure options --prefix=/usr/local --with-mpi-dir=/usr/local --with-fc=0 --with-openmp --with-hdf5-dir=/usr/local --download-f2cblaslapack=1</div><div class="ContentPasted3">[0]PETSC ERROR: #1 TSStep() at /home/jtu/Downloads/petsc-3.16.6/src/ts/interface/ts.c:3583</div></div></div></blockquote></div><br></div></body></html>