Skip to content

Commit

Permalink
spml/ucx: PR fixes 2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Shalev <mshalev.nvidia.com>
  • Loading branch information
michal-shalev committed Nov 13, 2024
1 parent 6dc87d1 commit 2ad0f14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oshmem/mca/spml/ucx/spml_ucx.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,15 +693,15 @@ int mca_spml_ucx_add_procs(oshmem_group_t* group, size_t nprocs)
}

indices = malloc(nprocs * sizeof(*indices));
if (!indices) {
if (NULL == indices) {
goto error;
}

for (i = 0; i < nprocs; i++) {
indices[i] = i;
}

srand((unsigned int)time(NULL));
srand(time(NULL));

/* Get the EP connection requests for all the processes from modex */
for (proc_index = nprocs - 1; proc_index >= 0; --proc_index) {
Expand All @@ -719,7 +719,7 @@ int mca_spml_ucx_add_procs(oshmem_group_t* group, size_t nprocs)
err = ucp_ep_create(mca_spml_ucx_ctx_default.ucp_worker[0], &ep_params,
&mca_spml_ucx_ctx_default.ucp_peers[indices[proc_index]].ucp_conn);
if (UCS_OK != err) {
SPML_UCX_ERROR("ucp_ep_create(proc=%d/%zu) failed: %s", proc_index, nprocs,
SPML_UCX_ERROR("ucp_ep_create(proc=%d/%zu, index=%u) failed: %s", proc_index, nprocs, indices[proc_index],
ucs_status_string(err));
goto error2;
}
Expand Down

0 comments on commit 2ad0f14

Please sign in to comment.