Something weird with SNES convergence reason

Barry Smith bsmith at
Thu May 15 09:04:52 CDT 2008

   run with -ksp_monitor -ksp_converged_reason to see how the linear  
solver is working. Also try adding
-ksp_rtol 1.e-10 to see if solving the linear system more accurately  
helps (it really shouldn't matter).
You can also run with -info to get a lot more detailed information  
about the nonlinear solve and the
line search. This is suppose to be an easy nonlinear problem so I  
would expect it to converge easily,
there may be a slight error with your FormFunction() that starts to  
matter only for larger problems.


On May 14, 2008, at 10:30 PM, Rafael Santos Coelho wrote:

> Hello everybody,
> I've coded a program which solves, in parallel, the three- 
> dimensional Bratu problem. Afterwards, I've run tests in a cluster  
> to see how it would go and, at first, it seemed ok to me, but then  
> I've noticed that whenever I increased the number of processors  
> (from 16 to 32, for example), the program started to diverge due to  
> a failure in the Line Search Newton's Method. Here is what a  
> monitoring function prints out:
> nonlinear iteration number  = 1, norm(F(x)) = 1013.53, linear  
> iterations = 16
> nonlinear iteration number  = 2, norm(F(x)) = 1013.33, linear  
> iterations = 32
> nonlinear iteration number  = 3, norm(F(x)) = 1013.33, linear  
> iterations = 48
> Nonlinear solve did not converge due to DIVERGED_LS_FAILURE
> Indeed, one can see that the method is really diverging (for smaller  
> tests, though, say N = 8 * 8 * 8, it converges).
> What's wrong here? Is it something with my code? If yes, how can I  
> fix it?
> Best regards,
> Rafael

More information about the petsc-users mailing list