Skip to content

Commit f79cab2

Browse files
authored
Merge pull request #5980 from bwbarrett/revert/4f435e81699d8bd3ad3db92e9779c387e172c5e0
Revert "RDMA OSC: initialize segment memory before registering the segment"
2 parents 9c1c4c1 + c4add41 commit f79cab2

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
@@ -586,7 +586,6 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
586586

587587
if (size && MPI_WIN_FLAVOR_ALLOCATE == module->flavor) {
588588
*base = (void *)((intptr_t) module->segment_base + my_base_offset);
589-
memset (*base, 0, size);
590589
}
591590

592591
module->rank_array = (ompi_osc_rdma_rank_data_t *) module->segment_base;
@@ -600,12 +599,7 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
600599
/* initialize my state */
601600
memset (module->state, 0, module->state_size);
602601

603-
/* barrier to make sure all ranks have attached and initialized */
604-
shared_comm->c_coll->coll_barrier(shared_comm, shared_comm->c_coll->coll_barrier_module);
605-
606602
if (0 == local_rank) {
607-
/* unlink the shared memory backing file */
608-
opal_shmem_unlink (&module->seg_ds);
609603
/* just go ahead and register the whole segment */
610604
ret = ompi_osc_rdma_register (module, MCA_BTL_ENDPOINT_ANY, module->segment_base, total_size, MCA_BTL_REG_FLAG_ACCESS_ANY,
611605
&module->state_handle);
@@ -626,6 +620,14 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
626620
}
627621
}
628622

623+
/* barrier to make sure all ranks have attached */
624+
shared_comm->c_coll->coll_barrier(shared_comm, shared_comm->c_coll->coll_barrier_module);
625+
626+
/* unlink the shared memory backing file */
627+
if (0 == local_rank) {
628+
opal_shmem_unlink (&module->seg_ds);
629+
}
630+
629631
if (MPI_WIN_FLAVOR_ALLOCATE == module->flavor) {
630632
ompi_osc_rdma_region_t *region = (ompi_osc_rdma_region_t *) module->state->regions;
631633
module->state->disp_unit = module->disp_unit;

0 commit comments

Comments
 (0)