Merge pull request #3603 from akva2/fix_mpi_double_finalize

fixed: double call to MPI_Finalize
This commit is contained in:
Atgeirr Flø Rasmussen 2021-10-13 10:13:12 +02:00 committed by GitHub
commit 54599f3fc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,9 +385,7 @@ namespace Opm
// the program should abort. This is the case e.g. for the --help and the
// --print-properties parameters.
#if HAVE_MPI
if (status < 0)
MPI_Finalize(); // graceful stop for --help or --print-properties command line.
else
if (status >= 0)
MPI_Abort(MPI_COMM_WORLD, status);
#endif
exitCode = (status > 0) ? status : EXIT_SUCCESS;