File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ OMPI_DECLSPEC extern bool ompi_mpi_initialized;
5555OMPI_DECLSPEC extern bool ompi_mpi_finalized ;
5656/** Has the RTE been initialized? */
5757OMPI_DECLSPEC extern bool ompi_rte_initialized ;
58+ /** Did mpi start to finalize? */
59+ OMPI_DECLSPEC extern int32_t ompi_mpi_finalize_started ;
5860
5961/** Do we have multiple threads? */
6062OMPI_DECLSPEC extern bool ompi_mpi_thread_multiple ;
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ extern bool ompi_enable_timing_ext;
9393int ompi_mpi_finalize (void )
9494{
9595 int ret ;
96- static int32_t finalize_has_already_started = 0 ;
9796 opal_list_item_t * item ;
9897 ompi_proc_t * * procs ;
9998 size_t nprocs ;
@@ -106,7 +105,7 @@ int ompi_mpi_finalize(void)
106105 ompi_comm_free() (or run into other nasty lions, tigers, or
107106 bears) */
108107
109- if (! opal_atomic_cmpset_32 (& finalize_has_already_started , 0 , 1 )) {
108+ if (! opal_atomic_cmpset_32 (& ompi_mpi_finalize_started , 0 , 1 )) {
110109 /* Note that if we're already finalized, we cannot raise an
111110 MPI exception. The best that we can do is write something
112111 to stderr. */
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ bool ompi_mpi_init_started = false;
128128bool ompi_mpi_initialized = false;
129129bool ompi_mpi_finalized = false;
130130bool ompi_rte_initialized = false;
131+ int32_t ompi_mpi_finalize_started = false;
131132
132133bool ompi_mpi_thread_multiple = false;
133134int ompi_mpi_thread_requested = MPI_THREAD_SINGLE ;
You can’t perform that action at this time.
0 commit comments