Commit f0f56cf5 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Do valid abort in serial case before MPI_Init.

parent a6edc37d
......@@ -75,9 +75,13 @@ FCALLSCSUB4(abort_ppm_fwrap, ABORT_PPM_F, abort_ppm_f, PVOID, STRING,
abort_ppm_default(MPI_Comm *comm, const char *msg, const char *source, int line)
int flag = 0;
fprintf(stderr, "Fatal error in %s, line %d: %s\n", source, line, msg);
#ifdef USE_MPI
MPI_Abort(*comm, 1);
if (MPI_Initialized(&flag) == MPI_SUCCESS && flag)
MPI_Abort(*comm, 1);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment