Skip to content

Commit 3675b26

Browse files
committed
SQUASHME: Fixes for the UCX component
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
1 parent 7dd3cef commit 3675b26

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,12 +468,14 @@ static const char* ompi_osc_ucx_set_no_lock_info(opal_infosubscriber_t *obj, con
468468
return module->no_locks ? "true" : "false";
469469
}
470470

471-
static int ompi_osc_ucx_shared_query_peer(ompi_osc_ucx_module_t *module, int rank, size_t *size,
471+
static int ompi_osc_ucx_shared_query_peer(ompi_osc_ucx_module_t *module, int peer, size_t *size,
472472
ptrdiff_t *disp_unit, void *baseptr) {
473473

474+
int rc;
474475
ucp_ep_h *dflt_ep;
475476
ucp_ep_h ep; // ignored
476-
OSC_UCX_GET_DEFAULT_EP(dflt_ep, module, peer); // TODO: needed?
477+
ucp_rkey_h rkey;
478+
OSC_UCX_GET_DEFAULT_EP(dflt_ep, module, peer);
477479
ucs_status_t status;
478480
opal_common_ucx_winfo_t *winfo; // ignored
479481
rc = opal_common_ucx_tlocal_fetch(module->mem, peer, &ep, &rkey, &winfo, dflt_ep);
@@ -485,9 +487,9 @@ static int ompi_osc_ucx_shared_query_peer(ompi_osc_ucx_module_t *module, int ran
485487
if (UCS_OK != ucp_rkey_ptr(rkey, module->addrs[peer], &addr_p)) {
486488
return OMPI_ERR_NOT_AVAILABLE;
487489
}
488-
*size = module->sizes[i];
489-
*((void**) baseptr) = (void *)module->shmem_addrs[i];
490-
*disp_unit = module->disp_units[i];
490+
*size = module->sizes[peer];
491+
*((void**) baseptr) = (void *)module->shmem_addrs[peer];
492+
*disp_unit = module->disp_units[peer];
491493

492494
return OMPI_SUCCESS;
493495
}
@@ -513,10 +515,8 @@ int ompi_osc_ucx_shared_query(struct ompi_win_t *win, int rank, size_t *size,
513515
}
514516
}
515517
} else {
516-
if (0 != module->sizes[i]) {
517-
if (OMPI_SUCCESS == ompi_osc_ucx_shared_query_peer(module, i, size, disp_unit, baseptr)) {
518-
return OMPI_SUCCESS;
519-
}
518+
if (0 != module->sizes[rank]) {
519+
return ompi_osc_ucx_shared_query_peer(module, rank, size, disp_unit, baseptr);
520520
}
521521
}
522522
return OMPI_ERR_NOT_SUPPORTED;

0 commit comments

Comments
 (0)