convergence monitoring

Barry Smith bsmith at mcs.anl.gov
Mon Oct 5 11:25:43 CDT 2009


On Oct 5, 2009, at 11:09 AM, Andreas Grassl wrote:

> Hello,
>
> I want to monitor the convergence of the KSP-solver, i.e. plot the  
> number of
> iterations vs. the error/residual norm.
>
> I discovered the options -ksp_monitor_draw_true_residual and
> -ksp_monitor_true_residual.
>
> Now the questions: What does the grafical output of
> -ksp_monitor_draw_true_residual represent? I see the iteration count  
> at the
> x-axis and expected the norm of the residual at the y-axis, and some  
> scaled
> value at the y-axis. Is this the logarithm of the residual/which  
> residual?

    It is the logarithm of  || b - A x || because of the "true" in the  
option name.

>
> If I output to .ps, I get overlayed the steps and don't see anything  
> useful at
> the end. Is there a way to extract only the last picture?

   The postscript viewer is pretty much a mess, ugly and limited; it  
is too much work for us
to maintain.

>
> Is there an easy (without hacking the PETSc sources) way to output a  
> customized
> convergence monitoring line like -ksp_monitor_true_residual at every  
> step?

    What do you want to do? I cannot understand your question. You can  
use KSPMonitorSet() to
provide any function you want to display residuals anyway you want.

    Barry

>
> Cheers,
>
> ando
>
> -- 
> /"\                               Grassl Andreas
> \ /    ASCII Ribbon Campaign      Uni Innsbruck Institut f. Mathematik
>  X      against HTML email        Technikerstr. 13 Zi 709
> / \                               +43 (0)512 507 6091



More information about the petsc-users mailing list