[petsc-dev] What to do when it's hopeless?

Jed Brown jed at 59A2.org
Thu May 13 10:48:08 CDT 2010


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



More information about the petsc-dev mailing list