clarification about convergence

Dominik Szczerba dominik at itis.ethz.ch
Wed Dec 9 12:49:58 CST 2009


Excellent point. Where it broke the reason was:

Starting KSPSolve
   0 KSP Residual norm 7.841852910113e-04
   1 KSP Residual norm 8.927576540999e-05
   2 KSP Residual norm 1.694401713084e-05
   3 KSP Residual norm 5.069425875318e-06
Linear solve converged due to CONVERGED_RTOL iterations 3

which I assume means that the norm became exactly 0

HOWEVER: putting -ksp_rtol -1 still does not eliminate the problem. Any 
further suggestions?

Dominik

Matthew Knepley wrote:
> Did you use -ksp_converged_reason to determine why PETSc stopped iterating?
> 
>   Matt
> 
> On Wed, Dec 9, 2009 at 11:45 AM, Dominik Szczerba <dominik at itis.ethz.ch 
> <mailto:dominik at itis.ethz.ch>> wrote:
> 
>     I am using
> 
>     -ksp_rtol 0 -ksp_atol 1e-6 (defaults for all the rest)
> 
>     and observe for most of the times convergence, as expected.
> 
>     Starting KSPSolve
>      0 KSP Residual norm 6.315132950112e-04
>      1 KSP Residual norm 9.139539245601e-05
>      2 KSP Residual norm 1.869750068013e-05
>      3 KSP Residual norm 6.788145356909e-06
>      4 KSP Residual norm 1.729115712274e-06
>      5 KSP Residual norm 7.214445966641e-07
>     solved in 2.328146e+00/4.144644e+00 s
>     solution converged in 5 iterations
>     ||Ax-b|| = 7.21445e-07
> 
>     with ||...|| being residue computed on my own for a check.
> 
>     However, SOMETIMES, I do observe:
> 
>     Starting KSPSolve
>      0 KSP Residual norm 1.228562818225e-02
>      1 KSP Residual norm 4.045833318123e-04
>      2 KSP Residual norm 6.589999324657e-05
>      3 KSP Residual norm 1.494849372638e-05
>      4 KSP Residual norm 4.311592172896e-06
>     solved in 1.368086e+00/2.235830e+00 s
>     solution converged in 4 iterations
>     ||Ax-b|| = 4.31159e-06
> 
>     which means that the iterations break sooner than they should.
>     Again, this is not often, but worries me why this should happen...
>     Using or not -ksp_converged_use_initial_residual_norm does not make
>     any difference to this behavior: the last output Residual norm is
>     sometimes higher than the requested atol.
> 
>     Any clarifications are highly appreciated.
> 
>     Dominik
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their 
> experiments is infinitely more interesting than any results to which 
> their experiments lead.
> -- Norbert Wiener



More information about the petsc-users mailing list