diff --git a/oshmem/mca/spml/ucx/spml_ucx_component.c b/oshmem/mca/spml/ucx/spml_ucx_component.c index e44a800a8be..c9b3b764288 100644 --- a/oshmem/mca/spml/ucx/spml_ucx_component.c +++ b/oshmem/mca/spml/ucx/spml_ucx_component.c @@ -458,7 +458,8 @@ static void mca_spml_ucx_ctx_fini(mca_spml_ucx_ctx_t *ctx) static int mca_spml_ucx_component_fini(void) { - int fenced = 0, i; + volatile int fenced = 0; + int i; int ret = OSHMEM_SUCCESS; mca_spml_ucx_ctx_t *ctx; @@ -491,7 +492,10 @@ static int mca_spml_ucx_component_fini(void) ret = opal_common_ucx_mca_pmix_fence_nb(&fenced); - if (OPAL_SUCCESS != ret) { + if (ret == PMIX_ERR_UNREACH) { + /* It's ok if we are disconnected, continue cleanup */ + fenced = 1; + } else if (ret != PMIX_SUCCESS) { return ret; }