Skip to content

Commit 49d2f44

Browse files
committed
osc/rdma: use correct endpoint for local state
If atomics are not globally visible (cpu and nic atomics do not mix) then a btl endpoint must be used to access local ranks. To avoid issues that are caused by having the same region registered with multiple handles osc/rdma was updated to always use the handle for rank 0. There was a bug in the update that caused osc/rdma to continue using the local endpoint for accessing the state even though the pointer/handle are not valid for that endpoint. This commit fixes the bug. Fixes #1241. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 243d973 commit 49d2f44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
627627
peer->state_handle = (mca_btl_base_registration_handle_t *) state_region->btl_handle_data;
628628
}
629629
peer->state = (osc_rdma_counter_t) ((uintptr_t) state_region->base + state_base + module->state_size * i);
630-
peer->state_endpoint = ompi_osc_rdma_peer_btl_endpoint (module, peer_rank);
630+
peer->state_endpoint = ompi_osc_rdma_peer_btl_endpoint (module, temp[0].rank);
631631
}
632632

633633
/* finish setting up the local peer structure */

0 commit comments

Comments
 (0)