[petsc-dev] SNESNEWTONLS

Angus, Justin Ray angus1 at llnl.gov
Tue Mar 7 11:03:14 CST 2023

Hi Barry,

Very helpful.

I’m still having some trouble with reconciling your answer to question number 2 based on some recent observations I have had. I’ve shared 1 slide concerning that observation, which I will briefly describe below.

I have a code that uses petsc but also has a native JFNK solver that works in the standard textbook way and always uses the full newton step. I recently found that the SNES newton solver in petsc with default options was failing on step 1 of a simulation, while our native solver worked fine. The fix for petsc was to switch from backtracking line search to basic.

Based in the information in the slide, can you make sense of this behavior?


From: Barry Smith <bsmith at petsc.dev>
Date: Tuesday, March 7, 2023 at 8:52 AM
To: "Angus, Justin Ray" <angus1 at llnl.gov>
Cc: "petsc-dev at mcs.anl.gov" <petsc-dev at mcs.anl.gov>
Subject: Re: [petsc-dev] SNESNEWTONLS

On Mar 7, 2023, at 11:36 AM, Angus, Justin Ray via petsc-dev <petsc-dev at mcs.anl.gov> wrote:


I’ve been using the default newton line search nonlinear solver in petsc. I recently discovered that the default line search method is bt – backtracking. I have two questions.

  1.  How exactly does the backtracking line search use the L2 norm of the function to modify the newton step? What is the formula?


  2.  Why is backtracking default? I would think that the basic method, which is a standard Newton method, would be default.

   All SNES Newton line searches use the full Newton step if it satisfies the Wolf conditions (there is some decrease in the function norm) and if the full Newton step is selected there is no nontrivial extra costs from using a line search (since the line search is never done) so there is no reason not to default to using SNESLINESEARCHBT. While using ONLY the full-step there may not convergence for many situations.  Hence our default.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20230307/6a3d1bc1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: petsc_newton_fail.pptx
Type: application/vnd.openxmlformats-officedocument.presentationml.presentation
Size: 723175 bytes
Desc: petsc_newton_fail.pptx
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20230307/6a3d1bc1/attachment-0001.pptx>

More information about the petsc-dev mailing list