2 #if PETSC_VERSION_GE(3, 8, 0)
3 #include <petsc/private/petscimpl.h>
7 const char *
fun,
const char *file,
8 PetscErrorCode
n, PetscErrorType p,
9 const char *mess,
void *ctx) {
17 if (comm != PETSC_COMM_SELF)
18 MPI_Comm_rank(comm, &rank);
22 if (p == PETSC_ERROR_INITIAL) {
24 char petsc_version[255];
25 PetscGetVersion(petsc_version, 255);
29 "--------------------- MoFEM Error Message "
30 "---------------------------------------------------");
32 MOFEM_LOG_C(
"SELF", MoFEM::Sev::error,
"MoFEM version %d.%d.%d (%s %s)",
33 MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD,
34 MOAB_VERSION_STRING, petsc_version);
36 MOFEM_LOG_C(
"SELF", MoFEM::Sev::error,
"MoFEM git commit id %s",
40 "See http://mofem.eng.gla.ac.uk/mofem/html/ "
41 "guidelines_bug_reporting.html for bug reporting.");
44 "SELF", MoFEM::Sev::error,
"%s",
45 "Write to https://groups.google.com/forum/#!forum/mofem-group to "
51 if (p == PETSC_ERROR_INITIAL) {
55 MOFEM_LOG_C(
"SELF", MoFEM::Sev::error,
"#%d %s() line %d in %s", cnt++,
59 PetscTraceBackErrorHandler(PETSC_COMM_SELF, line,
fun, file,
n, p, mess,
63 PetscBool ismain, isunknown;
64 PetscStrncmp(
fun,
"main", 4, &ismain);
65 PetscStrncmp(
fun,
"unknown", 7, &isunknown);
66 if (ismain || isunknown) {
69 #if PETSC_VERSION_GE(3, 7, 0)
70 PetscOptionsView(NULL, PETSC_VIEWER_STDERR_SELF);
72 PetscOptionsView(PETSC_VIEWER_STDERR_SELF);
78 "-- MoFEM End of Error Message -- send entire error "
79 "message to mofem-group@googlegroups.com --");