PetscExceptionTrySyncNorm

Runs the routine, causing a particular error code to be treated as an exception, rather than an error. That is if that error code is treated the program returns to this level, but does not call the error handlers Collective on Comm

Synopsis

PetscExceptionTrySyncNorm(MPI_Comm comm,PetscErrorCode routine(....),PetscErrorCode);

Notes: This synchronizes the error code across all processes in the communicator IF the code matches PetscErrorCode. The next call with an MPI_Reduce()/MPI_Allreduce() MUST be VecNorm() [We can added VecDot() and maybe others as needed].

PETSc must not be configured using the option --with-errorchecking=0 for this to work

Note: In general, the outer most try on an exception is the one that will be caught (that is trys down in PETSc code will not usually handle an exception that was issued above). See SNESSolve() for an example of how the local try is ignored if a higher (in the stack) one is also in effect.

See Also

PetscTraceBackErrorHandler(), PetscPushErrorHandler(), PetscError(), SETERRQ(), CHKMEMQ, SETERRQ1(), SETERRQ2(), SETERRQ3(),
CHKERRQ(), PetscExceptionCaught(), PetscExceptionPush(), PetscExceptionPop(), PetscExceptionTry1()

Level:advanced
Location:
src/sys/error/../../../include/petscerror.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages