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,18 +679,15 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
#endif
if (!ompi_singleton) {
/* If we have a non-blocking fence:
* if we are doing an async modex, but we are collecting all
if (opal_pmix_base_async_modex) {
/* 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_collect_all_data) {
/* execute the fence_nb in the background to collect
* the data */
background_fence = true;
@ -704,13 +701,17 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
error = "PMIx_Fence_nb() failed";
goto error;
}
} else if (!opal_pmix_base_async_modex) {
/* we want to do the modex */
}
} else {
/* we want to do the modex - we block at this point, but we must
* 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;
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, 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);
error = "PMIx_Fence() failed";
goto error;