Skip to content

Commit e7f9715

Browse files
committed
osc/rdma: set state_region->base for non accelerated btl
In allocate_state_shared(), state_region->base is used to calculate peer->state when CPU atomics is not used. Currently it is set only if accelerated btl is used, but it is used for non-accelerated btl too, causing peer->state to be set incorrectly. This patch addressed the issue. Signed-off-by: Wei Zhang <wzam@amazon.com>
1 parent fe92fbe commit e7f9715

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,13 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
714714
if (0 == local_rank) {
715715
/* unlink the shared memory backing file */
716716
opal_shmem_unlink (&module->seg_ds);
717+
718+
state_region->base = (intptr_t) module->segment_base;
717719
if (module->use_accelerated_btl) {
718720
/* just go ahead and register the whole segment */
719721
ret = ompi_osc_rdma_register(module, MCA_BTL_ENDPOINT_ANY, module->segment_base, total_size,
720722
MCA_BTL_REG_FLAG_ACCESS_ANY, &module->state_handle);
721723
if (OPAL_LIKELY(OMPI_SUCCESS == ret)) {
722-
state_region->base = (intptr_t) module->segment_base;
723724
if (module->state_handle) {
724725
memcpy(state_region->btl_handle_data, module->state_handle,
725726
module->accelerated_btl->btl_registration_handle_size);

0 commit comments

Comments
 (0)