OMPI: set "in finalize" indicator in finalize flow
Этот коммит содержится в:
родитель
d579a07383
Коммит
5bebed45eb
@ -55,6 +55,8 @@ OMPI_DECLSPEC extern bool ompi_mpi_initialized;
|
|||||||
OMPI_DECLSPEC extern bool ompi_mpi_finalized;
|
OMPI_DECLSPEC extern bool ompi_mpi_finalized;
|
||||||
/** Has the RTE been initialized? */
|
/** Has the RTE been initialized? */
|
||||||
OMPI_DECLSPEC extern bool ompi_rte_initialized;
|
OMPI_DECLSPEC extern bool ompi_rte_initialized;
|
||||||
|
/** Did mpi start to finalize? */
|
||||||
|
OMPI_DECLSPEC extern int32_t ompi_mpi_finalize_started;
|
||||||
|
|
||||||
/** Do we have multiple threads? */
|
/** Do we have multiple threads? */
|
||||||
OMPI_DECLSPEC extern bool ompi_mpi_thread_multiple;
|
OMPI_DECLSPEC extern bool ompi_mpi_thread_multiple;
|
||||||
|
@ -93,7 +93,6 @@ extern bool ompi_enable_timing_ext;
|
|||||||
int ompi_mpi_finalize(void)
|
int ompi_mpi_finalize(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
static int32_t finalize_has_already_started = 0;
|
|
||||||
opal_list_item_t *item;
|
opal_list_item_t *item;
|
||||||
ompi_proc_t** procs;
|
ompi_proc_t** procs;
|
||||||
size_t nprocs;
|
size_t nprocs;
|
||||||
@ -106,7 +105,7 @@ int ompi_mpi_finalize(void)
|
|||||||
ompi_comm_free() (or run into other nasty lions, tigers, or
|
ompi_comm_free() (or run into other nasty lions, tigers, or
|
||||||
bears) */
|
bears) */
|
||||||
|
|
||||||
if (! opal_atomic_cmpset_32(&finalize_has_already_started, 0, 1)) {
|
if (! opal_atomic_cmpset_32(&ompi_mpi_finalize_started, 0, 1)) {
|
||||||
/* Note that if we're already finalized, we cannot raise an
|
/* Note that if we're already finalized, we cannot raise an
|
||||||
MPI exception. The best that we can do is write something
|
MPI exception. The best that we can do is write something
|
||||||
to stderr. */
|
to stderr. */
|
||||||
|
@ -128,6 +128,7 @@ bool ompi_mpi_init_started = false;
|
|||||||
bool ompi_mpi_initialized = false;
|
bool ompi_mpi_initialized = false;
|
||||||
bool ompi_mpi_finalized = false;
|
bool ompi_mpi_finalized = false;
|
||||||
bool ompi_rte_initialized = false;
|
bool ompi_rte_initialized = false;
|
||||||
|
int32_t ompi_mpi_finalize_started = false;
|
||||||
|
|
||||||
bool ompi_mpi_thread_multiple = false;
|
bool ompi_mpi_thread_multiple = false;
|
||||||
int ompi_mpi_thread_requested = MPI_THREAD_SINGLE;
|
int ompi_mpi_thread_requested = MPI_THREAD_SINGLE;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user