Skip to content

Commit 30d3392

Browse files
committed
Revert "RDMA OSC: initialize segment memory before registering the segment"
This reverts commit 4fbe078. Issue open-mpi#5969 was caused by this commit and the 4.0.x release managers decided not to take this patch, so having it in 3.0.x and 3.1.x is a bit awkward. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent b162142 commit 30d3392

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,6 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
647647

648648
if (size && MPI_WIN_FLAVOR_ALLOCATE == module->flavor) {
649649
*base = (void *)((intptr_t) module->segment_base + my_base_offset);
650-
memset (*base, 0, size);
651650
}
652651

653652
module->rank_array = (ompi_osc_rdma_rank_data_t *) module->segment_base;
@@ -661,12 +660,7 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
661660
/* initialize my state */
662661
memset (module->state, 0, module->state_size);
663662

664-
/* barrier to make sure all ranks have attached and initialized */
665-
shared_comm->c_coll->coll_barrier(shared_comm, shared_comm->c_coll->coll_barrier_module);
666-
667663
if (0 == local_rank) {
668-
/* unlink the shared memory backing file */
669-
opal_shmem_unlink (&module->seg_ds);
670664
/* just go ahead and register the whole segment */
671665
ret = ompi_osc_rdma_register (module, MCA_BTL_ENDPOINT_ANY, module->segment_base, total_size, MCA_BTL_REG_FLAG_ACCESS_ANY,
672666
&module->state_handle);
@@ -687,6 +681,14 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
687681
}
688682
}
689683

684+
/* barrier to make sure all ranks have attached */
685+
shared_comm->c_coll->coll_barrier(shared_comm, shared_comm->c_coll->coll_barrier_module);
686+
687+
/* unlink the shared memory backing file */
688+
if (0 == local_rank) {
689+
opal_shmem_unlink (&module->seg_ds);
690+
}
691+
690692
if (MPI_WIN_FLAVOR_ALLOCATE == module->flavor) {
691693
ompi_osc_rdma_region_t *region = (ompi_osc_rdma_region_t *) module->state->regions;
692694
module->state->disp_unit = module->disp_unit;

0 commit comments

Comments
 (0)