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.
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