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
3 changes: 2 additions & 1 deletion config/ompi_check_ucx.m4
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ AC_DEFUN([OMPI_CHECK_UCX],[
UCP_ATOMIC_FETCH_OP_FAND,
UCP_ATOMIC_FETCH_OP_FOR,
UCP_ATOMIC_FETCH_OP_FXOR,
UCP_PARAM_FIELD_ESTIMATED_NUM_PPN],
UCP_PARAM_FIELD_ESTIMATED_NUM_PPN,
UCP_WORKER_FLAG_IGNORE_REQUEST_LEAK],
[], [],
[#include <ucp/api/ucp.h>])
AC_CHECK_DECLS([UCP_WORKER_ATTR_FIELD_ADDRESS_FLAGS],
Expand Down
7 changes: 7 additions & 0 deletions ompi/mca/pml/ucx/pml_ucx.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ int mca_pml_ucx_init(int enable_mpi_threads)
params.thread_mode = UCS_THREAD_MODE_SINGLE;
}

#if HAVE_DECL_UCP_WORKER_FLAG_IGNORE_REQUEST_LEAK
if (!ompi_pml_ucx.request_leak_check) {
params.field_mask |= UCP_WORKER_PARAM_FIELD_FLAGS;
params.flags |= UCP_WORKER_FLAG_IGNORE_REQUEST_LEAK;
}
#endif

status = ucp_worker_create(ompi_pml_ucx.ucp_context, &params,
&ompi_pml_ucx.ucp_worker);
if (UCS_OK != status) {
Expand Down
1 change: 1 addition & 0 deletions ompi/mca/pml/ucx/pml_ucx.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct mca_pml_ucx_module {

int priority;
bool cuda_initialized;
bool request_leak_check;
};

extern mca_pml_base_component_2_0_0_t mca_pml_ucx_component;
Expand Down
15 changes: 15 additions & 0 deletions ompi/mca/pml/ucx/pml_ucx_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ static int mca_pml_ucx_component_register(void)
OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL,
&ompi_pml_ucx.num_disconnect);

#if HAVE_DECL_UCP_WORKER_FLAG_IGNORE_REQUEST_LEAK
ompi_pml_ucx.request_leak_check = false;
(void) mca_base_component_var_register(&mca_pml_ucx_component.pmlm_version, "request_leak_check",
"Enable showing a warning during MPI_Finalize if some "
"non-blocking MPI requests have not been released",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL,
&ompi_pml_ucx.request_leak_check);
#else
/* If UCX does not support ignoring leak check, then it's always enabled */
ompi_pml_ucx.request_leak_check = true;
#endif

opal_common_ucx_mca_var_register(&mca_pml_ucx_component.pmlm_version);
return 0;
}
Expand Down