Skip to content

Commit c660b9b

Browse files
authored
Merge pull request #2401 from artpol84/lazy_wait_fix
ompi/init: always lazy-wait in ompi_mpi_init
2 parents 6c1025d + 06a73da commit c660b9b

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

ompi/runtime/ompi_mpi_init.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
2121
* Copyright (c) 2014-2016 Research Organization for Information Science
2222
* and Technology (RIST). All rights reserved.
23+
* Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
2324
*
2425
* $COPYRIGHT$
2526
*
@@ -279,7 +280,6 @@ opal_list_t ompi_registered_datareps = {{0}};
279280

280281
bool ompi_enable_timing = false, ompi_enable_timing_ext = false;
281282
extern bool ompi_mpi_yield_when_idle;
282-
extern bool ompi_mpi_lazy_wait_in_init;
283283
extern int ompi_mpi_event_tick_rate;
284284

285285
/**
@@ -529,11 +529,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
529529
opal_pmix.register_evhandler(NULL, &info, ompi_errhandler_callback,
530530
ompi_errhandler_registration_callback,
531531
(void*)&errtrk);
532-
if( ompi_mpi_lazy_wait_in_init ){
533-
OMPI_LAZY_WAIT_FOR_COMPLETION(errtrk.active);
534-
} else {
535-
OMPI_WAIT_FOR_COMPLETION(errtrk.active);
536-
}
532+
OMPI_LAZY_WAIT_FOR_COMPLETION(errtrk.active);
537533

538534
OPAL_LIST_DESTRUCT(&info);
539535
if (OPAL_SUCCESS != errtrk.status) {
@@ -660,11 +656,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
660656
if (NULL != opal_pmix.fence_nb) {
661657
opal_pmix.fence_nb(NULL, opal_pmix_collect_all_data,
662658
fence_release, (void*)&active);
663-
if( ompi_mpi_lazy_wait_in_init ){
664-
OMPI_LAZY_WAIT_FOR_COMPLETION(active);
665-
} else {
666-
OMPI_WAIT_FOR_COMPLETION(active);
667-
}
659+
OMPI_LAZY_WAIT_FOR_COMPLETION(active);
668660
} else {
669661
opal_pmix.fence(NULL, opal_pmix_collect_all_data);
670662
}
@@ -841,11 +833,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
841833
if (NULL != opal_pmix.fence_nb) {
842834
opal_pmix.fence_nb(NULL, opal_pmix_collect_all_data,
843835
fence_release, (void*)&active);
844-
if( ompi_mpi_lazy_wait_in_init ){
845-
OMPI_LAZY_WAIT_FOR_COMPLETION(active);
846-
} else {
847-
OMPI_WAIT_FOR_COMPLETION(active);
848-
}
836+
OMPI_LAZY_WAIT_FOR_COMPLETION(active);
849837
} else {
850838
opal_pmix.fence(NULL, opal_pmix_collect_all_data);
851839
}

ompi/runtime/ompi_mpi_params.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ bool ompi_have_sparse_group_storage = OPAL_INT_TO_BOOL(OMPI_GROUP_SPARSE);
6060
bool ompi_use_sparse_group_storage = OPAL_INT_TO_BOOL(OMPI_GROUP_SPARSE);
6161

6262
bool ompi_mpi_yield_when_idle = true;
63-
bool ompi_mpi_lazy_wait_in_init = false;
6463
int ompi_mpi_event_tick_rate = -1;
6564
char *ompi_mpi_show_mca_params_string = NULL;
6665
bool ompi_mpi_have_sparse_group_storage = !!(OMPI_GROUP_SPARSE);
@@ -113,14 +112,6 @@ int ompi_mpi_register_params(void)
113112
MCA_BASE_VAR_SCOPE_READONLY,
114113
&ompi_mpi_yield_when_idle);
115114

116-
ompi_mpi_lazy_wait_in_init = true;
117-
(void) mca_base_var_register("ompi", "mpi", NULL, "lazy_wait_in_init",
118-
"Avoid aggressive progress in MPI_Init, make sure that PMIx server has timeslots to progress",
119-
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
120-
OPAL_INFO_LVL_9,
121-
MCA_BASE_VAR_SCOPE_READONLY,
122-
&ompi_mpi_lazy_wait_in_init);
123-
124115
ompi_mpi_event_tick_rate = -1;
125116
(void) mca_base_var_register("ompi", "mpi", NULL, "event_tick_rate",
126117
"How often to progress TCP communications (0 = never, otherwise specified in microseconds)",

0 commit comments

Comments
 (0)