clarification about convergence

Matthew Knepley knepley at gmail.com
Wed Dec 9 12:38:19 CST 2009


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>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091209/d5272e27/attachment.htm>


More information about the petsc-users mailing list