Skip to content

Commit efe3962

Browse files
authored
Merge pull request #9358 from wzamazon/osc_rdma_fix_for_btl_ofi
osc/rdma: two bug fixes
2 parents 48254b0 + 8b19842 commit efe3962

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,6 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
605605
return allocate_state_single (module, base, size);
606606
}
607607

608-
if (local_size == global_size) {
609-
module->use_memory_registration = false;
610-
}
611-
612608
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "allocating shared internal state");
613609

614610
local_rank_array_size = sizeof (ompi_osc_rdma_rank_data_t) * RANK_ARRAY_COUNT (module);
@@ -788,7 +784,10 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
788784
peer->state_handle = (mca_btl_base_registration_handle_t *) state_region->btl_handle_data;
789785
}
790786
peer->state = (osc_rdma_counter_t) ((uintptr_t) state_region->base + state_base + module->state_size * i);
791-
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 {
792791
peer->state_endpoint = local_leader->state_endpoint;
793792
peer->state_btl_index = local_leader->state_btl_index;
794793
}

0 commit comments

Comments
 (0)