[petsc-users] Changes in SNES convergence criteria

Park, Heeho heepark at sandia.gov
Wed Feb 16 17:28:19 CST 2022


Hi Petsc developers,

I’m running into two issues related to SNES convergence criteria. First is setting convergence criteria to a large value. This used to work to effectively turn off RTOL, STOL, ATOL, and use PFLOTRAN’s Newton iteration convergence criteria using INF norms, but this trick does not work anymore ( example 1 ).
So, we set the condition to PETSc convergence criteria (default) AND PFLOTRAN convergence criteria to declare convergence, and get this error ( example 2).
Is there a good way to bypass SNES convergence criteria and use our own?
What’s happening in the second example?

Thank you,

Example 1:
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Argument out of range
[0]PETSC ERROR: Relative tolerance 1e+20 must be non-negative and less than 1.0
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Development GIT revision: v3.16.4-756-g5b3d650  GIT Date: 2022-02-02 17:48:52 +0000
[0]PETSC ERROR: /data/home/heepark/software/pflotran-bcnew-trd/src/pflotran/pflotran on a intel-c-opt named cb007 by tlaforc
 Tue Feb 15 19:45:39 2022
[0]PETSC ERROR: Configure options --with-petsc-arch=intel-c-opt --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpifort --with-c
language=c --with-shared-libraries=0 --with-debugging=0 --with-mpi=yes --download-sowing=yes --with-valgrind=yes --with-cmak
e=yes --with-make=yes --with-fblaslaback=yes --with-blaslapack=yes --FFLAGS="-diag-disable 5462" --CFLAGS="-O3 -g" --CXXFLAG
S="-O3 -g" --FFLAGS="-O3 -g" --with-hdf5-include=/data/home/heepark/software/hdf5/build/include --with-hdf5-lib="-L/data/hom
e/heepark/software/hdf5/build/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" --with-hypre-include=/data/home/heepark/
software/hypre/build/include --with-hypre-lib="-L/data/home/heepark/software/hypre/build/lib -lHYPRE" --with-metis-include=/
data/home/heepark/software/metis/include --with-metis-lib=/data/home/heepark/software/metis/build/libmetis/libmetis.a --with
-parmetis-include=/data/home/heepark/software/parmetis/include --with-parmetis-lib=/data/home/heepark/software/parmetis/buil
d/libparmetis/libparmetis.a --with-scalapack-lib=/data/home/heepark/software/scalapack/build/lib/libscalapack.a --with-hdf5-
fortran-bindings=yes
[0]PETSC ERROR: #1 SNESSetTolerances() at /data/home/heepark/software/petsc-main/src/snes/interface/snes.c:3833
[0]PETSC ERROR: #2 User provided function() at User file:0

Example 2:

[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------

[0]PETSC ERROR: Argument out of range

[0]PETSC ERROR: toranks[39] 40 not in comm size 40

[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.

[0]PETSC ERROR: Petsc Development GIT revision: v3.16.4-756-g5b3d650  GIT Date: 2022-02-02 17:48:52 +0000

[0]PETSC ERROR: /data/home/heepark/software/pflotran-bcnew-trd/src/pflotran/pflotran on a intel-c-opt named cb007 by tlaforc Wed Feb 16 14:13:12 2022

[0]PETSC ERROR: Configure options --with-petsc-arch=intel-c-opt --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpifort --with-clanguage=c --with-shared-libraries=0 --with-debugging=0 --with-mpi=yes --download-sowing=yes --with-valgrind=yes --with-cmake=yes --with-make=yes --with-fblaslaback=yes --with-blaslapack=yes --FFLAGS="-diag-disable 5462" --CFLAGS="-O3 -g" --CXXFLAGS="-O3 -g" --FFLAGS="-O3 -g" --with-hdf5-include=/data/home/heepark/software/hdf5/build/include --with-hdf5-lib="-L/data/home/heepark/software/hdf5/build/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" --with-hypre-include=/data/home/heepark/software/hypre/build/include --with-hypre-lib="-L/data/home/heepark/software/hypre/build/lib -lHYPRE" --with-metis-include=/data/home/heepark/software/metis/include --with-metis-lib=/data/home/heepark/software/metis/build/libmetis/libmetis.a --with-parmetis-include=/data/home/heepark/software/parmetis/include --with-parmetis-lib=/data/home/heepark/software/parmetis/build/libparmetis/libparmetis.a --with-scalapack-lib=/data/home/heepark/software/scalapack/build/lib/libscalapack.a --with-hdf5-fortran-bindings=yes

[0]PETSC ERROR: #1 PetscCommBuildTwoSidedFReq() at /data/home/heepark/software/petsc-main/src/sys/utils/mpits.c:555

[0]PETSC ERROR: #2 MatStashScatterBegin_BTS() at /data/home/heepark/software/petsc-main/src/mat/utils/matstash.c:940

[0]PETSC ERROR: #3 MatStashScatterBegin_Private() at /data/home/heepark/software/petsc-main/src/mat/utils/matstash.c:461

[0]PETSC ERROR: #4 MatAssemblyBegin_MPIAIJ() at /data/home/heepark/software/petsc-main/src/mat/impls/aij/mpi/mpiaij.c:673

[0]PETSC ERROR: #5 MatAssemblyBegin() at /data/home/heepark/software/petsc-main/src/mat/interface/matrix.c:5592

[0]PETSC ERROR: #6 User provided function() at User file:0

[0]PETSC ERROR: #7 oursnesjacobian() at /data/home/heepark/software/petsc-main/src/snes/interface/ftn-custom/zsnesf.c:173

[0]PETSC ERROR: #8 SNESComputeJacobian() at /data/home/heepark/software/petsc-main/src/snes/interface/snes.c:2864

[0]PETSC ERROR: #9 SNESSolve_NEWTONLS() at /data/home/heepark/software/petsc-main/src/snes/impls/ls/ls.c:222

[0]PETSC ERROR: #10 SNESSolve() at /data/home/heepark/software/petsc-main/src/snes/interface/snes.c:4810

[0]PETSC ERROR: #11 User provided function() at User file:0


Heeho Daniel Park

! ------------------------------------ !
Sandia National Laboratories
Org: 08844, R&D
Work: 505-844-1319
! ------------------------------------ !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220216/6841c93f/attachment-0001.html>


More information about the petsc-users mailing list