[petsc-users] Number of Iteration of KSP and relative tolerance

Barry Smith bsmith at mcs.anl.gov
Wed Aug 31 12:51:37 CDT 2016


  From the KSP view 

using PRECONDITIONED norm type for convergence test

it is using the ratio of the preconditioned residual norms for the convergence test, not the true residual norms.
If you want to use the true residual norm use -ksp_pc_side right   See also KSPSetNormType() and KSPSetPCSide()

   Barry


> On Aug 31, 2016, at 10:32 AM, Ivano Barletta <ibarletta at inogs.it> wrote:
> 
> Dear Petsc Users
> 
> I'm using Petsc to solve an elliptic equation
> 
> The code can be run in parallel but I'm running
> some tests in sequential by the moment
> 
> When I look at the output, what it looks odd to 
> me is that the relative tolerance that I set is 
> not fulfilled. 
> I've set -ksp_rtol 1e-8 in my runtime options
> but the solver stops when the ratio
> || r || / || b || is still 9e-8, then almost
> one order of magnitude greater of the rtol 
> that I set (as you can see in the txt in attachment).
> 
> My question is, isn't the solver supposed to 
> make other few iterations to reach the relative tolerance?
> 
> Thanks in advance for replies and suggestions
> Kind Regards 
> Ivano 
> 
> P.S. my runtime options are these:
> -ksp_monitor_true_residual -ksp_type cg -ksp_converged_reason -ksp_view -ksp_rtol 1e-8 
> 
> <ksp_out.txt>



More information about the petsc-users mailing list