I'm concerned by the following which appears in
PetscAttachDebuggerErrorHandler() and Petsc_MPI_DebuggerOnError():
ierr = PetscAttachDebugger();
if (ierr) { /* hopeless so get out */
MPI_Finalize();
exit(*flag);
}
Since the error handler is not guaranteed to be called collectively, it
seems completely unreasonable to call a collective function, especially
not one with broader scope than PETSC_COMM_WORLD. It seems to me that
the hopeless case should instead call MPI_Abort() on the relevant
communicator. Similarly, why does Petsc_MPI_AbortOnError() call abort()
instead of MPI_Abort()?
Jed