Merge pull request #1335 from paulromano/openmpi-fix2

Better conditional for call to MPI_Type_free
This commit is contained in:
Amanda Lund 2019-09-11 16:17:20 -05:00 committed by GitHub
commit 5968db8cdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,9 +127,7 @@ int openmc_finalize()
// Free all MPI types
#ifdef OPENMC_MPI
int init_called;
MPI_Initialized(&init_called);
if (init_called) MPI_Type_free(&mpi::bank);
if (mpi::bank != MPI_DATATYPE_NULL) MPI_Type_free(&mpi::bank);
#endif
return 0;