Skip to content

Commit 67de921

Browse files
authored
Merge pull request #13419 from Sergei-Lebedev/topic/ucc_set_local_id_v4
COLL/UCC: set node local id - v4.1.x
2 parents ed90ff5 + b5754ef commit 67de921

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
@@ -236,6 +236,9 @@ static int mca_coll_ucc_init_ctx() {
236236
ucc_thread_mode_t tm_requested;
237237
ucc_lib_params_t lib_params;
238238
ucc_context_params_t ctx_params;
239+
unsigned ucc_api_major, ucc_api_minor, ucc_api_patch;
240+
241+
ucc_get_version(&ucc_api_major, &ucc_api_minor, &ucc_api_patch);
239242

240243
tm_requested = ompi_mpi_thread_multiple ? UCC_THREAD_MULTIPLE :
241244
UCC_THREAD_SINGLE;
@@ -299,6 +302,15 @@ static int mca_coll_ucc_init_ctx() {
299302
goto cleanup_lib;
300303
}
301304

305+
if (ucc_api_major > 1 || (ucc_api_major == 1 && ucc_api_minor >= 6)) {
306+
sprintf(str_buf, "%u", opal_process_info.my_local_rank);
307+
if (UCC_OK != ucc_context_config_modify(ctx_config, NULL, "NODE_LOCAL_ID",
308+
str_buf)) {
309+
UCC_ERROR("UCC context config modify failed for node_local_id");
310+
goto cleanup_lib;
311+
}
312+
}
313+
302314
if (UCC_OK != ucc_context_create(cm->ucc_lib, &ctx_params,
303315
ctx_config, &cm->ucc_context)) {
304316
UCC_ERROR("UCC context create failed");

0 commit comments

Comments
 (0)