[petsc-users] BDF2 using two SNES solves per step

Mark Lohry mlohry at gmail.com
Wed Oct 2 16:17:00 CDT 2019


I've been using -ts_type bdf for some cases, and I'm seeing odd behavior I
haven't seen previously; BDF is doing two nonlinear solves per step instead
of one. Not just on the first iteration where I understand it needs two
solves to do crank-nicolson. Output pasted below.

I recently added -snes_force_iteration to this setup because some related
cases were hitting the STOL tolerance too easily and skipping the step.
Possible there's a bug here?



      TSAdapt none bdf 0:2 step 4338 accepted t=12.9405    + 3.000e-03
dt=3.000e-03
4339 TS dt 0.003 time 12.9435
    0 SNES Function norm 4.226055465790e+05
      0 KSP Residual norm 4.226055465790e+05
      1 KSP Residual norm 7.217261332498e+04
      2 KSP Residual norm 1.716940034507e+04
      3 KSP Residual norm 3.609973232253e+03
      4 KSP Residual norm 9.570019108717e+02
      5 KSP Residual norm 3.181149723450e+02
      6 KSP Residual norm 1.098208407227e+02
      7 KSP Residual norm 4.299901363380e+01
      8 KSP Residual norm 1.801536459692e+01
    Linear solve converged due to CONVERGED_RTOL iterations 8
        Line search: Using full step: fnorm 4.226055465790e+05 gnorm
9.086241923538e+02
    1 SNES Function norm 9.086241923538e+02
      0 KSP Residual norm 9.086241923538e+02
      1 KSP Residual norm 2.732368360068e+02
      2 KSP Residual norm 5.946263156564e+01
      3 KSP Residual norm 1.318454641577e+01
      4 KSP Residual norm 4.246879230104e+00
      5 KSP Residual norm 1.629532917180e+00
      6 KSP Residual norm 7.256484455948e-01
      7 KSP Residual norm 2.902145678910e-01
      8 KSP Residual norm 1.057108012071e-01
      9 KSP Residual norm 3.932046314157e-02
    Linear solve converged due to CONVERGED_RTOL iterations 9
        Line search: Using full step: fnorm 9.086241923538e+02 gnorm
1.085625777754e-01
    2 SNES Function norm 1.085625777754e-01
  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 2
    0 SNES Function norm 4.118788489827e+05
      0 KSP Residual norm 4.118788489827e+05
      1 KSP Residual norm 6.711617192535e+04
      2 KSP Residual norm 1.492314271439e+04
      3 KSP Residual norm 3.057857706767e+03
      4 KSP Residual norm 7.126664078732e+02
      5 KSP Residual norm 1.733711813386e+02
      6 KSP Residual norm 5.128037920544e+01
      7 KSP Residual norm 1.934133099773e+01
    Linear solve converged due to CONVERGED_RTOL iterations 7
        Line search: Using full step: fnorm 4.118788489827e+05 gnorm
8.042808436078e+02
    1 SNES Function norm 8.042808436078e+02
      0 KSP Residual norm 8.042808436078e+02
      1 KSP Residual norm 2.226749543958e+02
      2 KSP Residual norm 4.893662950348e+01
      3 KSP Residual norm 1.014517695941e+01
      4 KSP Residual norm 2.919647780049e+00
      5 KSP Residual norm 1.212767990171e+00
      6 KSP Residual norm 4.595747459796e-01
      7 KSP Residual norm 1.380287337736e-01
      8 KSP Residual norm 3.905014995608e-02
    Linear solve converged due to CONVERGED_RTOL iterations 8
        Line search: Using full step: fnorm 8.042808436078e+02 gnorm
9.400756998055e-02
    2 SNES Function norm 9.400756998055e-02
  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 2
      TSAdapt none bdf 0:2 step 4339 accepted t=12.9435    + 3.000e-03
dt=3.000e-03
4340 TS dt 0.003 time 12.9465
    0 SNES Function norm 4.225721444289e+05
      0 KSP Residual norm 4.225721444289e+05
      1 KSP Residual norm 7.216809879956e+04
      2 KSP Residual norm 1.716800266656e+04
      3 KSP Residual norm 3.609544652142e+03
      4 KSP Residual norm 9.568035630128e+02
      5 KSP Residual norm 3.180994491726e+02
      6 KSP Residual norm 1.097953544519e+02
      7 KSP Residual norm 4.299356909365e+01
      8 KSP Residual norm 1.801685954142e+01
    Linear solve converged due to CONVERGED_RTOL iterations 8
        Line search: Using full step: fnorm 4.225721444289e+05 gnorm
9.085909169586e+02
    1 SNES Function norm 9.085909169586e+02
      0 KSP Residual norm 9.085909169586e+02
      1 KSP Residual norm 2.732217555260e+02
      2 KSP Residual norm 5.946115359458e+01
      3 KSP Residual norm 1.318376336422e+01
      4 KSP Residual norm 4.246505956377e+00
      5 KSP Residual norm 1.629395330390e+00
      6 KSP Residual norm 7.256387857307e-01
      7 KSP Residual norm 2.902187369698e-01
      8 KSP Residual norm 1.057339888296e-01
      9 KSP Residual norm 3.933238584494e-02
    Linear solve converged due to CONVERGED_RTOL iterations 9
        Line search: Using full step: fnorm 9.085909169586e+02 gnorm
1.080918043129e-01
    2 SNES Function norm 1.080918043129e-01
  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 2
    0 SNES Function norm 4.118496718810e+05
      0 KSP Residual norm 4.118496718810e+05
      1 KSP Residual norm 6.711314158688e+04
      2 KSP Residual norm 1.492217651739e+04
      3 KSP Residual norm 3.057646684123e+03
      4 KSP Residual norm 7.125472187771e+02
      5 KSP Residual norm 1.733587575824e+02
      6 KSP Residual norm 5.128167491875e+01
      7 KSP Residual norm 1.934091783097e+01
    Linear solve converged due to CONVERGED_RTOL iterations 7
        Line search: Using full step: fnorm 4.118496718810e+05 gnorm
8.042975384362e+02
    1 SNES Function norm 8.042975384362e+02
      0 KSP Residual norm 8.042975384362e+02
      1 KSP Residual norm 2.226789925199e+02
      2 KSP Residual norm 4.893747432913e+01
      3 KSP Residual norm 1.014667103302e+01
      4 KSP Residual norm 2.920119822095e+00
      5 KSP Residual norm 1.213085518447e+00
      6 KSP Residual norm 4.596447482282e-01
      7 KSP Residual norm 1.380197971941e-01
      8 KSP Residual norm 3.903724744383e-02
    Linear solve converged due to CONVERGED_RTOL iterations 8
        Line search: Using full step: fnorm 8.042975384362e+02 gnorm
9.401994558838e-02
    2 SNES Function norm 9.401994558838e-02
  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 2
      TSAdapt none bdf 0:2 step 4340 accepted t=12.9465    + 3.000e-03
dt=3.000e-03
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191002/1154bdbb/attachment-0001.html>


More information about the petsc-users mailing list