ksp_monitor and hypre/boomeramg

Shao-Ching Huang schuang at ats.ucla.edu
Wed Nov 12 11:51:31 CST 2008

Hi Barry:

Thank you for your comment. I will set -pc_hypre_boomeramg_tol
explicitly for now.


On Tue, Nov 11, 2008 at 09:26:27PM -0600, Barry Smith wrote:
>   You are not doing anything wrong. If you run with the additional
> option -pc_hypre_boomeramg_tol <rtol> where you use the same rtol
> here as you use for -ksp_rtol <rtol> (default is 1.e-5) then you will
> get the behavior you expect.
>   This is a "feature"/"design bug" in our 2.3.3 interface to HYPRE's  
> BoomerAMG.
> It uses a default -pc_hypre_boomeramg_tol of 0.0 which causes it to
> run the BoomerAMG cycle for the full default 10,000 cycles when run
> with Richardson.
>   In src/ksp/pc/impls/hypre/hypre.c line 608 you will find
>   ierr = HYPRE_BoomerAMGSetTol(jac->hsolver,PetscMin(rtol,jac- 
> >tol));CHKERRQ(ierr);
> it has been changed in petsc-dev to
>   ierr = HYPRE_BoomerAMGSetTol(jac->hsolver,rtol);CHKERRQ(ierr);
> this causes it to only run BoomerAMG cycles until it gets below the KSP 
> rtol.
>    Barry
> Note: running Richardson with and without monitoring is different code
> for many preconditioners. This is because monitoring reguires the || 
> residual||
> at each iteration. Many Richardson application of preconditioners like  
> SOR,
> and BoomerAMG never compute the residual hence cannot compute || 
> residual||.
> These preconditioners have a separate PCApplyRichardson() method rather
> then just calling PCApply() and computing the residual at each  
> iteration.

More information about the petsc-users mailing list