Skip to content

Commit 43a7a16

Browse files
authored
Merge pull request #13418 from Sergei-Lebedev/topic/ucc_set_local_id_v5
COLL/UCC: set node local id - v5.0.x
2 parents 237cdcc + e3beb10 commit 43a7a16

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ompi/mca/coll/ucc/coll_ucc_module.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ static int mca_coll_ucc_init_ctx() {
291291
ucc_thread_mode_t tm_requested;
292292
ucc_lib_params_t lib_params;
293293
ucc_context_params_t ctx_params;
294+
unsigned ucc_api_major, ucc_api_minor, ucc_api_patch;
295+
296+
ucc_get_version(&ucc_api_major, &ucc_api_minor, &ucc_api_patch);
294297

295298
tm_requested = ompi_mpi_thread_multiple ? UCC_THREAD_MULTIPLE :
296299
UCC_THREAD_SINGLE;
@@ -354,6 +357,15 @@ static int mca_coll_ucc_init_ctx() {
354357
goto cleanup_lib;
355358
}
356359

360+
if (ucc_api_major > 1 || (ucc_api_major == 1 && ucc_api_minor >= 6)) {
361+
sprintf(str_buf, "%u", opal_process_info.my_local_rank);
362+
if (UCC_OK != ucc_context_config_modify(ctx_config, NULL, "NODE_LOCAL_ID",
363+
str_buf)) {
364+
UCC_ERROR("UCC context config modify failed for node_local_id");
365+
goto cleanup_lib;
366+
}
367+
}
368+
357369
if (UCC_OK != ucc_context_create(cm->ucc_lib, &ctx_params,
358370
ctx_config, &cm->ucc_context)) {
359371
UCC_ERROR("UCC context create failed");

0 commit comments

Comments
 (0)