[petsc-users] TS failed due to diverged_step_rejected
Barry Smith
bsmith at petsc.dev
Fri Feb 17 11:58:02 CST 2023
Can you please run with also the options -ts_monitor -ts_adapt_monitor ?
The output is confusing because it prints that the Nonlinear solve has converged but then TSStep has failed due to DIVERGED_STEP_REJECTED which seems contradictory
> On Feb 17, 2023, at 12:09 PM, Tu, Jiannan <Jiannan_Tu at uml.edu> wrote:
>
> 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."
>
> 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.
>
> Could you help me to identify what is going wrong?
>
> Thank you very much!
>
> Jiannan
>
> ---------------------------------------------------------------------------------------------------
> Run command with options
>
> mpiexec -n $1 ./iditm3d -ts_type arkimex -snes_tyep ngmres -ksp_type gmres -pc_type asm \
> -ts_rtol 1.0e-4 -ts_atol 1.0e-4 -snes_monitor -snes_rtol 1.0e-4 -snes_atol 1.0e-4 \
> -snes_converged_reason
>
> The output message is
>
> Start time advancing ...
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 1.673091274668e-03
> Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1
> 0 SNES Function norm 8.715428433630e-02
> 1 SNES Function norm 4.995727626692e-04
> 2 SNES Function norm 5.498018152230e-08
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2
> 0 SNES Function norm 3.237461568254e-01
> 1 SNES Function norm 7.988531005091e-04
> 2 SNES Function norm 1.280948196292e-07
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 4.881903203545e-04
> Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1
> 0 SNES Function norm 7.562592690785e-02
> 1 SNES Function norm 1.143078818923e-04
> 2 SNES Function norm 9.834547907735e-09
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2
> 0 SNES Function norm 2.683968949758e-01
> 1 SNES Function norm 1.838028436639e-04
> 2 SNES Function norm 9.470813523140e-09
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 2
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 1.821562431175e-04
> Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1
> 0 SNES Function norm 1.005443458812e-01
> 1 SNES Function norm 3.633336946661e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 1.515368382715e-01
> 1 SNES Function norm 3.389298316830e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 4.541003359206e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 1.713800906043e-01
> 1 SNES Function norm 1.179958172167e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.020265094117e-01
> 1 SNES Function norm 1.513971290464e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 6.090269704320e-06
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.136603895703e-01
> 1 SNES Function norm 1.877474016012e-06
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 3.127812462507e-01
> 1 SNES Function norm 2.713146825704e-06
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 2.793512213059e-06
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.205196267430e-01
> 1 SNES Function norm 2.572653773308e-06
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 3.260057361977e-01
> 1 SNES Function norm 2.705816087598e-06
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 2.764855860446e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.212505522844e-01
> 1 SNES Function norm 2.958996472386e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 3.273222034162e-01
> 1 SNES Function norm 2.994512887620e-05
> Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
> 0 SNES Function norm 2.274473072186e+03
> 1 SNES Function norm 3.317240589134e-04
> Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1
> 0 SNES Function norm 2.213246532918e-01
> 1 SNES Function norm 2.799468604767e-04
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> 0 SNES Function norm 3.274570888397e-01
> 1 SNES Function norm 3.066048050994e-04
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> 0 SNES Function norm 2.274473072189e+03
> 1 SNES Function norm 2.653507278572e-03
> Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1
> 0 SNES Function norm 2.213869585841e-01
> 1 SNES Function norm 2.177156902895e-03
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> 0 SNES Function norm 3.275136370365e-01
> 1 SNES Function norm 1.962849131557e-03
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> 0 SNES Function norm 2.274473072218e+03
> 1 SNES Function norm 5.664907315679e-03
> Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1
> 0 SNES Function norm 2.223208399368e-01
> 1 SNES Function norm 5.688863091415e-03
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> 0 SNES Function norm 3.287121218919e-01
> 1 SNES Function norm 4.085338521320e-03
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> 0 SNES Function norm 2.274473071968e+03
> 1 SNES Function norm 4.694691905235e-04
> Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 1
> 0 SNES Function norm 2.211786508657e-01
> 1 SNES Function norm 1.503497433939e-04
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> 0 SNES Function norm 3.272667798977e-01
> 1 SNES Function norm 2.176132327279e-04
> Nonlinear solve converged due to CONVERGED_SNORM_RELATIVE iterations 1
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR:
> [0]PETSC ERROR: TSStep has failed due to DIVERGED_STEP_REJECTED
> [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.16.6, Mar 30, 2022
> [0]PETSC ERROR: ./iditm3d on a named office by jtu Fri Feb 17 11:59:43 2023
> [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
> [0]PETSC ERROR: #1 TSStep() at /home/jtu/Downloads/petsc-3.16.6/src/ts/interface/ts.c:3583
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230217/ed7205e4/attachment-0001.html>
More information about the petsc-users
mailing list