Skip to content

Commit 8b19842

Browse files
committed
osc/rdma: setup the state_endpoint and state_btl_index of first peer
In function "allocate_state_shared", the peer->state_endpoint was copied from 1st peer (a.k.a local_leader). However, state_endpoint and state_btl_index of the 1st peer was not set, causing all peers' state_endpoint being NULL. This patch addresses the issue by setting 1st peer's state_endpoint and state_btl_index from its data_endpoint and data_btl_index. Signed-off-by: Wei Zhang <wzam@amazon.com>
1 parent 6d0bdb5 commit 8b19842

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,10 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
784784
peer->state_handle = (mca_btl_base_registration_handle_t *) state_region->btl_handle_data;
785785
}
786786
peer->state = (osc_rdma_counter_t) ((uintptr_t) state_region->base + state_base + module->state_size * i);
787-
if (i > 0) {
787+
if (i==0) {
788+
peer->state_endpoint = peer->data_endpoint;
789+
peer->state_btl_index = peer->data_btl_index;
790+
} else {
788791
peer->state_endpoint = local_leader->state_endpoint;
789792
peer->state_btl_index = local_leader->state_btl_index;
790793
}

0 commit comments

Comments
 (0)