[petsc-users] How to use rtol as stopping criteria for PCMG subksp solver
Aulisa, Eugenio
eugenio.aulisa at ttu.edu
Thu Sep 1 09:02:34 CDT 2016
Hi,
I have
ksp GMRES->preconditioned with PCMG
and at each level
subksp GMRES -> preconditioned with different PCs
I would like to control the stopping criteria of each level-subksp
using either the relative tolerance or the npre/npost number of smoothings
I set at each level
KSPSetNormType(subksp, KSP_NORM_PRECONDITIONED); // assuming left preconditioner
KSPSetTolerances(subksp, rtol, PETSC_DEFAULT, PETSC_DEFAULT, npre);
It seams (but I am not sure how to check it properly) that rtol is completely uninfluential,
rather it always uses the fix number of iterations fixed by npre.
When I run with the option -ksp_view I see that the norm for the subksp
has effectively changed from NONE to PRECONDITIONED
for example with rtol=0.1 and npre=10 I get
%%%%%%%%%%%%%%%%%%%
Down solver (pre-smoother) on level 2 -------------------------------
KSP Object: (level-2) 4 MPI processes
type: gmres
GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement
GMRES: happy breakdown tolerance 1e-30
maximum iterations=10
tolerances: relative=0.1, absolute=1e-50, divergence=10000.
left preconditioning
using nonzero initial guess
using PRECONDITIONED norm type for convergence test
%%%%%%%%%%%%%%%%%%%%%
however when I run the code with -ksp_monitor_true_residual
I only see the iteration info of the external ksp GMRES,
but I do not see any iteration info relative to the subksps.
I assume (but I am not sure) that subksp is behaving
as the NONE norm were set.
Any idea if I set something wrong?
How do I effectively check how many iterations subksp does?
thanks,
Eugenio
Eugenio Aulisa
Department of Mathematics and Statistics,
Texas Tech University
Lubbock TX, 79409-1042
room: 226
http://www.math.ttu.edu/~eaulisa/
phone: (806) 834-6684
fax: (806) 742-1112
More information about the petsc-users
mailing list