Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ompi/oshmem/spml/ucx: Fix cleanup when disconnected: avoid double free #12297

Merged
merged 1 commit into from
Feb 7, 2024
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
1 change: 1 addition & 0 deletions oshmem/mca/spml/ucx/spml_ucx.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ BEGIN_C_DECLS

#define SPML_UCX_ASSERT MCA_COMMON_UCX_ASSERT
#define SPML_UCX_ERROR MCA_COMMON_UCX_ERROR
#define SPML_UCX_WARN MCA_COMMON_UCX_WARN
#define SPML_UCX_VERBOSE MCA_COMMON_UCX_VERBOSE
#define SPML_UCX_TRANSP_IDX 0
#define SPML_UCX_TRANSP_CNT 1
Expand Down
9 changes: 6 additions & 3 deletions oshmem/mca/spml/ucx/spml_ucx_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
brminich marked this conversation as resolved.
Show resolved Hide resolved
int i;
int ret = OSHMEM_SUCCESS;
mca_spml_ucx_ctx_t *ctx;

Expand Down Expand Up @@ -491,8 +492,10 @@ static int mca_spml_ucx_component_fini(void)


ret = opal_common_ucx_mca_pmix_fence_nb(&fenced);
if (OPAL_SUCCESS != ret) {
return ret;
if (ret != PMIX_SUCCESS) {
SPML_UCX_WARN("pmix fence failed: %s", PMIx_Error_string(ret));
/* In case of pmix fence failure just continue cleanup */
fenced = 1;
}
brminich marked this conversation as resolved.
Show resolved Hide resolved

while (!fenced) {
Expand Down
Loading