Skip to content

Commit 6d0bdb5

Browse files
committed
osc/rdma: do not set use_memory_registraiton in allocate_state_shared
Currenntly, in function allocate_state_shared, "module->use_memory_registation" is set to false when all MPI ranks are on same instances (local_size == global_size). This is harmful when there is only one btl in use, in which case the selected btl should determine whether memory registration should be used. For example, btl/ofi uses memory registration even on same instance. This is unnecessary when three are two btls in use, in which case btls that uses memory registration have been excluded in function ompi_osc_rdma_query_alternate_btls. Therefore, this commit removes the setting of module->use_memory_registration in allocate_state_shared. Signed-off-by: Wei Zhang <wzam@amazon.com>
1 parent 5e42613 commit 6d0bdb5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 0 additions & 4 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);

0 commit comments

Comments
 (0)