Skip to content

Commit 20d0968

Browse files
authored
Merge pull request open-mpi#13406 from rakhmets/topic/ucx-set-local-rank
OMPI/MCA/PML/UCX: Set node local id.
2 parents fdd3da8 + a7db118 commit 20d0968

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

config/ompi_check_ucx.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ AC_DEFUN([OMPI_CHECK_UCX],[
9999
UCP_WORKER_FLAG_IGNORE_REQUEST_LEAK,
100100
UCP_OP_ATTR_FLAG_MULTI_SEND,
101101
UCS_MEMORY_TYPE_RDMA,
102-
UCP_MEM_MAP_SYMMETRIC_RKEY],
102+
UCP_MEM_MAP_SYMMETRIC_RKEY,
103+
UCP_PARAM_FIELD_NODE_LOCAL_ID],
103104
[], [],
104105
[#include <ucp/api/ucp.h>])
105106
AC_CHECK_DECLS([UCP_WORKER_ATTR_FIELD_ADDRESS_FLAGS],

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ static int ucp_context_init(bool enable_mt, int proc_world_size) {
271271
context_params.field_mask |= UCP_PARAM_FIELD_ESTIMATED_NUM_PPN;
272272
#endif
273273

274+
#if HAVE_DECL_UCP_PARAM_FIELD_NODE_LOCAL_ID
275+
context_params.node_local_id = opal_process_info.my_local_rank;
276+
context_params.field_mask |= UCP_PARAM_FIELD_NODE_LOCAL_ID;
277+
#endif
278+
274279
status = ucp_init(&context_params, config, &mca_osc_ucx_component.wpool->ucp_ctx);
275280
if (UCS_OK != status) {
276281
OSC_UCX_VERBOSE(1, "ucp_init failed: %d", status);

ompi/mca/pml/ucx/pml_ucx.c

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

252+
#if HAVE_DECL_UCP_PARAM_FIELD_NODE_LOCAL_ID
253+
params.node_local_id = opal_process_info.my_local_rank;
254+
params.field_mask |= UCP_PARAM_FIELD_NODE_LOCAL_ID;
255+
#endif
256+
252257
status = ucp_init(&params, config, &ompi_pml_ucx.ucp_context);
253258
ucp_config_release(config);
254259

oshmem/mca/spml/ucx/spml_ucx_component.c

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

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

0 commit comments

Comments
 (0)