Skip to content

Commit 351e716

Browse files
authored
Merge pull request #13413 from brminich/ucx/add_local_id_4.1.x
OMPI/MCA/PML/UCX: Set node local id - v4.1.x
2 parents 37e1204 + f7fdc74 commit 351e716

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

config/ompi_check_ucx.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ AC_DEFUN([OMPI_CHECK_UCX],[
141141
UCP_WORKER_FLAG_IGNORE_REQUEST_LEAK,
142142
UCP_OP_ATTR_FLAG_MULTI_SEND,
143143
UCS_MEMORY_TYPE_RDMA,
144-
UCP_MEM_MAP_SYMMETRIC_RKEY],
144+
UCP_MEM_MAP_SYMMETRIC_RKEY,
145+
UCP_PARAM_FIELD_NODE_LOCAL_ID],
145146
[], [],
146147
[#include <ucp/api/ucp.h>])
147148
AC_CHECK_DECLS([UCP_WORKER_ATTR_FIELD_ADDRESS_FLAGS],

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ static int ucp_context_init(void) {
178178
context_params.request_init = internal_req_init;
179179
context_params.request_size = sizeof(ompi_osc_ucx_internal_request_t);
180180

181+
#if HAVE_DECL_UCP_PARAM_FIELD_ESTIMATED_NUM_PPN
182+
context_params.estimated_num_ppn = opal_process_info.num_local_peers + 1;
183+
context_params.field_mask |= UCP_PARAM_FIELD_ESTIMATED_NUM_PPN;
184+
#endif
185+
186+
#if HAVE_DECL_UCP_PARAM_FIELD_NODE_LOCAL_ID
187+
context_params.node_local_id = opal_process_info.my_local_rank;
188+
context_params.field_mask |= UCP_PARAM_FIELD_NODE_LOCAL_ID;
189+
#endif
190+
181191
status = ucp_init(&context_params, config, &mca_osc_ucx_component.ucp_context);
182192
ucp_config_release(config);
183193
if (UCS_OK != status) {

ompi/mca/pml/ucx/pml_ucx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ int mca_pml_ucx_open(void)
232232
params.field_mask |= UCP_PARAM_FIELD_ESTIMATED_NUM_PPN;
233233
#endif
234234

235+
#if HAVE_DECL_UCP_PARAM_FIELD_NODE_LOCAL_ID
236+
params.node_local_id = opal_process_info.my_local_rank;
237+
params.field_mask |= UCP_PARAM_FIELD_NODE_LOCAL_ID;
238+
#endif
239+
235240
status = ucp_init(&params, config, &ompi_pml_ucx.ucp_context);
236241
ucp_config_release(config);
237242

oshmem/mca/spml/ucx/spml_ucx_component.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@ static int spml_ucx_init(void)
292292
params.field_mask |= UCP_PARAM_FIELD_ESTIMATED_NUM_PPN;
293293
#endif
294294

295+
#if HAVE_DECL_UCP_PARAM_FIELD_NODE_LOCAL_ID
296+
params.node_local_id = opal_process_info.my_local_rank;
297+
params.field_mask |= UCP_PARAM_FIELD_NODE_LOCAL_ID;
298+
#endif
299+
295300
err = ucp_init(&params, ucp_config, &mca_spml_ucx.ucp_context);
296301
ucp_config_release(ucp_config);
297302
if (UCS_OK != err) {

0 commit comments

Comments
 (0)