Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ompi/dpm/dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,11 @@ int ompi_dpm_disconnect(ompi_communicator_t *comm)

/* ensure we tell the host RM to disconnect us - this
* is a blocking operation so just use a fence */
ret = opal_pmix.fence(&coll, false);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(&coll, false))) {
OMPI_ERROR_LOG(ret);
OPAL_LIST_DESTRUCT(&coll);
return ret;
}
OPAL_LIST_DESTRUCT(&coll);

return ret;
Expand Down
10 changes: 8 additions & 2 deletions ompi/mca/bml/r2/bml_r2_ft.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ int mca_bml_r2_ft_event(int state)
* Barrier to make all processes have been successfully restarted before
* we try to remove some restart only files.
*/
opal_pmix.fence(NULL, 0);
if( OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "bml:r2: ft_event(Restart): Failed to fence complete\n");
return ret;
}

/*
* Re-open the BTL framework to get the full list of components.
Expand Down Expand Up @@ -224,7 +227,10 @@ int mca_bml_r2_ft_event(int state)
* Barrier to make all processes have been successfully restarted before
* we try to remove some restart only files.
*/
opal_pmix.fence(NULL, 0);
if( OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "bml:r2: ft_event(Restart): Failed to fence complete\n");
return ret;
}

/*
* Re-open the BTL framework to get the full list of components.
Expand Down
20 changes: 15 additions & 5 deletions ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c
Original file line number Diff line number Diff line change
Expand Up @@ -3028,7 +3028,10 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_ft_event(

if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCPBR0);
opal_pmix.fence(NULL, 0);
if( OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
exit_status = ret;
goto DONE;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCP0);

Expand Down Expand Up @@ -3096,7 +3099,10 @@ ompi_crcp_base_pml_state_t* ompi_crcp_bkmrk_pml_ft_event(

if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_COREBR1);
opal_pmix.fence(NULL, 0);
if( OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
exit_status = ret;
goto DONE;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CORE2);
}
Expand Down Expand Up @@ -6207,14 +6213,16 @@ static void clear_timers(void) {
static void display_all_timers(int state) {
bool report_ready = false;
double barrier_start, barrier_stop;
int i;
int i, ret;

if( 0 != OMPI_PROC_MY_NAME->vpid ) {
if( 2 > timing_enabled ) {
return;
}
else if( 2 == timing_enabled ) {
opal_pmix.fence(NULL, 0);
if( OPAL_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
OPAL_ERROR_LOG(ret);
}
return;
}
}
Expand All @@ -6235,7 +6243,9 @@ static void display_all_timers(int state) {

if( timing_enabled >= 2) {
barrier_start = get_time();
opal_pmix.fence(NULL, 0);
if( OPAL_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
OPAL_ERROR_LOG(ret);
}
barrier_stop = get_time();
opal_output(0,
"crcp:bkmrk: timing(%20s): %20s = %10.2f s\n",
Expand Down
40 changes: 32 additions & 8 deletions ompi/mca/pml/bfo/pml_bfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,10 @@ int mca_pml_bfo_ft_event( int state )
if(OPAL_CRS_CHECKPOINT == state) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCPBR1);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}
}

OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P0);
Expand All @@ -677,7 +680,10 @@ int mca_pml_bfo_ft_event( int state )
if( !first_continue_pass ) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_COREBR0);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P2);
}
Expand Down Expand Up @@ -777,7 +783,10 @@ int mca_pml_bfo_ft_event( int state )
if( !first_continue_pass ) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2PBR1);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P3);
}
Expand All @@ -787,7 +796,10 @@ int mca_pml_bfo_ft_event( int state )
* Exchange the modex information once again.
* BTLs will have republished their modex information.
*/
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}

/*
* Startup the PML stack now that the modex is running again
Expand All @@ -799,7 +811,10 @@ int mca_pml_bfo_ft_event( int state )
}

/* Is this barrier necessary ? JJH */
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}

if( NULL != procs ) {
for(p = 0; p < (int)num_procs; ++p) {
Expand All @@ -812,7 +827,10 @@ int mca_pml_bfo_ft_event( int state )
if( !first_continue_pass ) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2PBR2);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCP1);
}
Expand All @@ -825,7 +843,10 @@ int mca_pml_bfo_ft_event( int state )
* Exchange the modex information once again.
* BTLs will have republished their modex information.
*/
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}

/*
* Startup the PML stack now that the modex is running again
Expand All @@ -837,7 +858,10 @@ int mca_pml_bfo_ft_event( int state )
}

/* Is this barrier necessary ? JJH */
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:bfo: ft_event(Restart): Failed to fence complete");
return ret;
}

if( NULL != procs ) {
for(p = 0; p < (int)num_procs; ++p) {
Expand Down
40 changes: 32 additions & 8 deletions ompi/mca/pml/ob1/pml_ob1.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,10 @@ int mca_pml_ob1_ft_event( int state )
if(OPAL_CRS_CHECKPOINT == state) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCPBR1);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}
}

OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P0);
Expand All @@ -818,7 +821,10 @@ int mca_pml_ob1_ft_event( int state )
if( !first_continue_pass ) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_COREBR0);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P2);
}
Expand Down Expand Up @@ -918,13 +924,19 @@ int mca_pml_ob1_ft_event( int state )
if( !first_continue_pass ) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2PBR1);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2P3);
}

if (opal_cr_continue_like_restart && !first_continue_pass) {
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}

/*
* Startup the PML stack now that the modex is running again
Expand All @@ -936,7 +948,10 @@ int mca_pml_ob1_ft_event( int state )
}

/* Is this barrier necessary ? JJH */
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}

if( NULL != procs ) {
for(p = 0; p < (int)num_procs; ++p) {
Expand All @@ -949,7 +964,10 @@ int mca_pml_ob1_ft_event( int state )
if( !first_continue_pass ) {
if( opal_cr_timing_barrier_enabled ) {
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_P2PBR2);
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}
}
OPAL_CR_SET_TIMER(OPAL_CR_TIMER_CRCP1);
}
Expand All @@ -962,7 +980,10 @@ int mca_pml_ob1_ft_event( int state )
* Exchange the modex information once again.
* BTLs will have republished their modex information.
*/
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}

/*
* Startup the PML stack now that the modex is running again
Expand All @@ -974,7 +995,10 @@ int mca_pml_ob1_ft_event( int state )
}

/* Is this barrier necessary ? JJH */
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
opal_output(0, "pml:ob1: ft_event(Restart): Failed to fence complete");
return ret;
}

if( NULL != procs ) {
for(p = 0; p < (int)num_procs; ++p) {
Expand Down
6 changes: 5 additions & 1 deletion ompi/mca/pml/ucx/pml_ucx.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ int mca_pml_ucx_del_procs(struct ompi_proc_t **procs, size_t nprocs)
void *dreq, **dreqs;
ucp_ep_h ep;
size_t i;
int ret;

max_reqs = ompi_pml_ucx.num_disconnect;
if (max_reqs > nprocs) {
Expand Down Expand Up @@ -433,7 +434,10 @@ int mca_pml_ucx_del_procs(struct ompi_proc_t **procs, size_t nprocs)
mca_pml_ucx_waitall(dreqs, &num_reqs);
free(dreqs);

opal_common_ucx_mca_pmix_fence(ompi_pml_ucx.ucp_worker);
if (OMPI_SUCCESS != (ret = opal_common_ucx_mca_pmix_fence(
ompi_pml_ucx.ucp_worker))) {
return ret;
}

return OMPI_SUCCESS;
}
Expand Down
5 changes: 4 additions & 1 deletion ompi/mca/pml/yalla/pml_yalla.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ int mca_pml_yalla_add_procs(struct ompi_proc_t **procs, size_t nprocs)
int mca_pml_yalla_del_procs(struct ompi_proc_t **procs, size_t nprocs)
{
size_t i;
int ret;

if (ompi_mpi_state >= OMPI_MPI_STATE_FINALIZE_STARTED) {
PML_YALLA_VERBOSE(3, "%s", "using bulk powerdown");
Expand All @@ -276,7 +277,9 @@ int mca_pml_yalla_del_procs(struct ompi_proc_t **procs, size_t nprocs)
PML_YALLA_VERBOSE(2, "disconnected from rank %s", OPAL_NAME_PRINT(procs[i]->super.proc_name));
procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PML] = NULL;
}
opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
return ret;
}
return OMPI_SUCCESS;
}

Expand Down
12 changes: 10 additions & 2 deletions ompi/runtime/ompi_mpi_finalize.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,13 @@ int ompi_mpi_finalize(void)
* communications/actions to complete. See
* https://github.com/open-mpi/ompi/issues/1576 for the
* original bug report. */
opal_pmix.fence_nb(NULL, 0, fence_cbfunc, (void*)&active);
if (OMPI_SUCCESS != (ret = opal_pmix.fence_nb(NULL, 0, fence_cbfunc,
(void*)&active))) {
OMPI_ERROR_LOG(ret);
/* Reset the active flag to false, to avoid waiting for
* completion when the fence was failed. */
active = false;
}
OMPI_LAZY_WAIT_FOR_COMPLETION(active);
} else {
/* However, we cannot guarantee that the provided PMIx has
Expand All @@ -268,7 +274,9 @@ int ompi_mpi_finalize(void)
ompi_communicator_t *comm = &ompi_mpi_comm_world.comm;
comm->c_coll->coll_barrier(comm, comm->c_coll->coll_barrier_module);

opal_pmix.fence(NULL, 0);
if (OMPI_SUCCESS != (ret = opal_pmix.fence(NULL, 0))) {
OMPI_ERROR_LOG(ret);
}
}
}

Expand Down
Loading