1
1

Merge pull request #7525 from rhc54/topic/fence

Correct fence logic in MPI_Init
Этот коммит содержится в:
Ralph Castain 2020-03-11 16:55:01 -07:00 коммит произвёл GitHub
родитель 7c31586c6d dd623cec34
Коммит c296dada2c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -679,38 +679,39 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
#endif #endif
if (!ompi_singleton) { if (!ompi_singleton) {
/* If we have a non-blocking fence:
* if we are doing an async modex, but we are collecting all
* data, then execute the non-blocking modex in the background.
* All calls to modex_recv will be cached until the background
* modex completes. If collect_all_data is false, then we skip
* the fence completely and retrieve data on-demand from the
* source node.
*
* If we do not have a non-blocking fence, then we must always
* execute the blocking fence as the system does not support
* later data retrieval. */
if (opal_pmix_base_async_modex) { if (opal_pmix_base_async_modex) {
/* execute the fence_nb in the background to collect /* if we are doing an async modex, but we are collecting all
* the data */ * data, then execute the non-blocking modex in the background.
background_fence = true; * All calls to modex_recv will be cached until the background
active = true; * modex completes. If collect_all_data is false, then we skip
OPAL_POST_OBJECT(&active); * the fence completely and retrieve data on-demand from the
PMIX_INFO_LOAD(&info[0], PMIX_COLLECT_DATA, &opal_pmix_collect_all_data, PMIX_BOOL); * source node.
if( PMIX_SUCCESS != (rc = PMIx_Fence_nb(NULL, 0, NULL, 0, */
fence_release, if (opal_pmix_collect_all_data) {
(void*)&active))) { /* execute the fence_nb in the background to collect
ret = opal_pmix_convert_status(rc); * the data */
error = "PMIx_Fence_nb() failed"; background_fence = true;
goto error; active = true;
OPAL_POST_OBJECT(&active);
PMIX_INFO_LOAD(&info[0], PMIX_COLLECT_DATA, &opal_pmix_collect_all_data, PMIX_BOOL);
if( PMIX_SUCCESS != (rc = PMIx_Fence_nb(NULL, 0, NULL, 0,
fence_release,
(void*)&active))) {
ret = opal_pmix_convert_status(rc);
error = "PMIx_Fence_nb() failed";
goto error;
}
} }
} else {
} else if (!opal_pmix_base_async_modex) { /* we want to do the modex - we block at this point, but we must
/* we want to do the modex */ * do so in a manner that allows us to call opal_progress so our
* event library can be cycled as we have tied PMIx to that
* event base */
active = true; active = true;
OPAL_POST_OBJECT(&active); OPAL_POST_OBJECT(&active);
PMIX_INFO_LOAD(&info[0], PMIX_COLLECT_DATA, &opal_pmix_collect_all_data, PMIX_BOOL); PMIX_INFO_LOAD(&info[0], PMIX_COLLECT_DATA, &opal_pmix_collect_all_data, PMIX_BOOL);
if( PMIX_SUCCESS != (rc = PMIx_Fence_nb(NULL, 0, info, 1, fence_release, (void*)&active))) { rc = PMIx_Fence_nb(NULL, 0, info, 1, fence_release, (void*)&active);
if( PMIX_SUCCESS != rc) {
ret = opal_pmix_convert_status(rc); ret = opal_pmix_convert_status(rc);
error = "PMIx_Fence() failed"; error = "PMIx_Fence() failed";
goto error; goto error;