[petsc-users] SNES line search basic

Barry Smith bsmith at mcs.anl.gov
Tue Oct 22 13:07:02 CDT 2013


On Oct 22, 2013, at 2:18 AM, Gong Ding <gdiso at ustc.edu> wrote:

> Hi,
> I updated petsc from 3.2 to 3.4. However, I found that the nonlinear solver previously worked well now failed with massage DIVERGED_LINE_SEARCH. 
> My problem is extremely nonlinear, cubic line search may fail but Newton method works.
> 
> With petsc 3.2, I only use basic Newton by calling 
> SNESLineSearchSet(snes, SNESLineSearchNo, PETSC_NULL) 
> With 3.4 I call basic Newton by  
> SNESLineSearchSetType(snes, SNESLINESEARCHBASIC).

   You need to use 

    SNESLineSearch ls;
    SNESGetLineSearch(snes,&ls);
    SNESLineSearchSetType(ls,SNESLINESEARCHBASIC) 

   is that what you do? 

    Try calling 

    SNESLineSearchView(ls,NULL); immediately after this and see what it reports.

   Possibly somehow later the line search is being reset back to the default.

    It is suppose to behave like previous versions of PETSc and just use the full Newton step.

   Barry

> 
> However, petsc 3.4 still reports 
> [0] SNESSolve_NEWTONLS(): fnorm=3.7500000000000006e-02, gnorm=3.7500000000000006e-02, ynorm=1.0000000000000000e+00, lssucceed=0
> [0] SNESNEWTONLSCheckLocalMin_Private(): || J^T F|| 1.414213562373e+00 near zero implies found a local minimum  
> 
> 
> It seems petsc 3.4 can not disable line search. Does anyone have the same problem?
> 
> Gong Ding
> 
> 
> 



More information about the petsc-users mailing list