<div class="gmail_quote">On Tue, Sep 20, 2011 at 11:45, Matija Kecman <span dir="ltr"><<a href="mailto:matijakecman@gmail.com">matijakecman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":x5">$ mpirun -np 1 ./ex3 -ksp_type gmres -pc_type none -m 100<br>Norm of error 0.570146 Iterations 0</div></blockquote></div><br><div>This uses a nonzero initial guess so the initial residual norm is compared to the right hand side.</div>
<div><br></div><div><div>$ ./ex3 -ksp_type gmres -ksp_monitor -m 100 -pc_type none -ksp_converged_reason -info |grep Converged</div><div>[0] KSPDefaultConverged(): user has provided nonzero initial guess, computing 2-norm of preconditioned RHS</div>
<div>[0] KSPDefaultConverged(): Linear solver has converged. Residual norm 1.113646413065e-04 is less than relative tolerance 1.000000000000e-05 times initial right hand side norm 1.291007358616e+01 at iteration 0</div></div>
<div><br></div><div>You can use the true residual, it just costs something so it's not enabled by default:</div><div><br></div><div>$ ./ex3 -ksp_type gmres -ksp_monitor -m 100 -pc_type none -ksp_converged_reason -ksp_converged_use_initial_residual_norm</div>
<div>[many iterations]</div><div>Linear solve converged due to CONVERGED_RTOL iterations 1393</div><div>Norm of error 0.000664957 Iterations 1393</div>