Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 32ff921

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 open-mpi/ompi#1241. (cherry picked from open-mpi/ompi@49d2f44) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 11b5b18 commit 32ff921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
620620
peer->state_handle = (mca_btl_base_registration_handle_t *) state_region->btl_handle_data;
621621
}
622622
peer->state = (osc_rdma_counter_t) ((uintptr_t) state_region->base + state_base + module->state_size * i);
623-
peer->state_endpoint = ompi_osc_rdma_peer_btl_endpoint (module, peer_rank);
623+
peer->state_endpoint = ompi_osc_rdma_peer_btl_endpoint (module, temp[0].rank);
624624
}
625625

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

0 commit comments

Comments
 (0)