[PETSC #19425] steptol in SNES LS routines
Barry Smith
bsmith at mcs.anl.gov
Sat May 9 13:09:08 CDT 2009
After looking at the code I see why it ended up being so
complicated. It needs some thought.
The way the line search works is
1) if the full step satisfies the reduction criteria it returns
2) if the full step is smaller (measured by the 2 norm) then stol it
returns (in other words if the full step satisfies the "small step"
SNES convergence criteria)
this catches the case when the full step is zero length (but
also may return with a bigger function norm than last time) This also
returns with the flag saying linesearch successful,
should it really say successful?
3) otherwise it fits the function to the quadratic or cubic function
until
a) reduction criteria satisfied or
b) step length is too small as measured by this strange max_i p_i/
x_i "norm" using again stol this returns with a flag saying line
search unsuccessful
Now my first inclination was to change 3b to use a -snes_ls_minstep
<minstep> value instead of stol. Thus one could control the minimum
step size in the
line search without affecting the convergence tolerances. This may be
a correct fix.
But what about 2a? Do I continue to use the stol here? Do I use the
new <minstep> value; I don't think so because that is used in 3a with
a very different norm so minstep has two meanings. Do I introduce a
third tolerance; yuck. Do I just check if it is exactly zero only?
My inclination is to have a check for exactly zero only and then let
3b determine if it should return immediately (because the line search
length is too small). If we totally remove 2 (and the step is zero)
then 3b will return immediately BUT it will return with a flag saying
linesearch failed (while 2 currently says success).
Thoughts anyone?
Barry
On May 8, 2009, at 6:34 PM, Eric Meier wrote:
> Hi,
>
> In the line search routines within SNES, I think there is some
> confusion about the option -snes_stol <stol>.
>
> On this page
> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESSetTolerances.html
> stol is defined one way. But on this page
> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESLineSearchQuadratic.html
> it is defined another way.
>
> When I look in the PETSc code (ls.c), it seems to me that PETSc uses
> the option set with -snes_stol as the minimum step size in the line
> search routines (quadratic and cubic). But, it seems to use that
> same tolerance in the sense that
>
> stol
> - convergence tolerance in terms of the norm of the change in the
> solution between steps
>
> Therefore, I don't see how to control the minimum step size in the
> line search routines without affecting the convergence tolerances.
>
> Eric
More information about the petsc-dev
mailing list