[petsc-dev] TAO convergence tests are undecipherable
Barry Smith
bsmith at mcs.anl.gov
Tue Sep 8 21:54:49 CDT 2015
Jason,
Perhaps it is just documentation.
/*@
TaoSetTolerances - Sets parameters used in TAO convergence tests
Logically collective on Tao
Input Parameters:
+ tao - the Tao context
. fatol - absolute convergence tolerance
. frtol - relative convergence tolerance
. gatol - stop if norm of gradient is less than this
. grtol - stop if relative norm of gradient is less than this
- gttol - stop if norm of gradient is reduced by this factor
Options Database Keys:
+ -tao_fatol <fatol> - Sets fatol
. -tao_frtol <frtol> - Sets frtol
. -tao_gatol <gatol> - Sets gatol
. -tao_grtol <grtol> - Sets grtol
- -tao_gttol <gttol> - Sets gttol
Stopping Criteria:
$ f(X) - f(X*) (estimated) <= fatol
$ |f(X) - f(X*)| (estimated) / |f(X)| <= frtol
$ ||g(X)|| <= gatol
$ ||g(X)|| / |f(X)| <= grtol
$ ||g(X)|| / ||g(X0)|| <= gttol
How is f(x) - f(X*) (estimated) and how come the second definition has absolute values but the first does not?
From below it looks like f(x) - f(X*) is estimated as gnorm*gnorm?
} else if (gnorm2 <= fatol && cnorm <=catol) {
ierr = PetscInfo2(tao,"Converged due to estimated f(X) - f(X*) = %g < %g\n",(double)gnorm2,(double)fatol);CHKERRQ(ierr);
reason = TAO_CONVERGED_FATOL;
} else if (f != 0 && gnorm2 / PetscAbsReal(f)<= frtol && cnorm/PetscMax(cnorm0,1.0) <= crtol) {
ierr = PetscInfo2(tao,"Converged due to estimated |f(X)-f(X*)|/f(X) = %g < %g\n",(double)(gnorm2/PetscAbsReal(f)),(double)frtol);CHKERRQ(ierr);
reason = TAO_CONVERGED_FRTOL;
It seems the next test is the same as the first I list above exact gnorm is not squared? Why is it worth having this duplicate test?
} else if (gnorm<= gatol && cnorm <=catol) {
ierr = PetscInfo2(tao,"Converged due to residual norm ||g(X)||=%g < %g\n",(double)gnorm,(double)gatol);CHKERRQ(ierr);
reason = TAO_CONVERGED_GATOL;
At a minimum the manual page should document what f(X) - f(X*) (estimated) means.
Barry
} else if ( f!=0 && PetscAbsReal(gnorm/f) <= grtol && cnorm <= crtol) {
ierr = PetscInfo2(tao,"Converged due to residual ||g(X)||/|f(X)| =%g < %g\n",(double)(gnorm/f),(double)grtol);CHKERRQ(ierr);
More information about the petsc-dev
mailing list