Skip to content
Snippets Groups Projects
Commit c5d46571 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: downgrade to warning and exit if MPI_Finalized is called twice.

- this can occur when OpenFOAM is run in serial mode, but connects to
  a program that starts/stops MPI on its own.
parent 9972b434
Branches
Tags
No related merge requests found
...@@ -216,10 +216,11 @@ void Foam::UPstream::exit(int errnum) ...@@ -216,10 +216,11 @@ void Foam::UPstream::exit(int errnum)
MPI_Finalized(&flag); MPI_Finalized(&flag);
if (flag) if (flag)
{ {
// Already finalized // Already finalized - warn and exit
FatalErrorInFunction WarningInFunction
<< "MPI was already finalized" << endl << "MPI was already finalized (perhaps by a connected program)"
<< Foam::abort(FatalError); << endl;
::exit(1);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment