Skip to content

Commit

Permalink
Merge branch 'hpx_1_5' of github.com:STEllAR-GROUP/cinch into hpx_1_5
Browse files Browse the repository at this point in the history
  • Loading branch information
Irina committed Nov 16, 2020
2 parents 43ea0e3 + 6b837e2 commit a239a76
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions auxiliary/test-hpx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ main(int argc, char ** argv) {

#if defined(CINCH_ENABLE_MPI)
if(has_mpi) {
MPI_Finalize();
int finalized = 1;
MPI_Finalized(&finalized);
if (!finalized) {
// Shutdown the MPI runtime
MPI_Finalize();
}
}
#endif

Expand Down Expand Up @@ -216,8 +221,12 @@ main(int argc, char ** argv) {

#if defined(CINCH_ENABLE_MPI)
if(has_mpi) {
// Shutdown the MPI runtime
MPI_Finalize();
int finalized = 1;
MPI_Finalized(&finalized);
if (!finalized) {
// Shutdown the MPI runtime
MPI_Finalize();
}
}
#endif

Expand Down

0 comments on commit a239a76

Please sign in to comment.