Skip to content

Commit d56ef3f

Browse files
authored
Merge pull request #9310 from karasevb/shmem_finalyze
shmem: fix `oshmem_shmem_finalize()` when `main()` returns not zero value.
2 parents 38c47fa + ceb9259 commit d56ef3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

oshmem/runtime/oshmem_shmem_finalize.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#include "oshmem/shmem/shmem_lock.h"
5454
#include "oshmem/runtime/oshmem_shmem_preconnect.h"
5555

56-
extern int oshmem_shmem_globalexit_status;
56+
extern int oshmem_shmem_inglobalexit;
5757

5858
static int _shmem_finalize(void);
5959

@@ -79,7 +79,7 @@ int oshmem_shmem_finalize(void)
7979
if ((OSHMEM_SUCCESS == ret) &&
8080
(state >= OMPI_MPI_STATE_INIT_COMPLETED &&
8181
state < OMPI_MPI_STATE_FINALIZE_PAST_COMM_SELF_DESTRUCT) &&
82-
oshmem_shmem_globalexit_status == 0) {
82+
(oshmem_shmem_inglobalexit == 0)) {
8383
PMPI_Comm_free(&oshmem_comm_world);
8484
ret = ompi_mpi_finalize();
8585
}

0 commit comments

Comments
 (0)