Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 2baf6b9

Browse files
committed
osc/rdma: fix typo
Need to increment the total size after checking the local offset not before. This typo causes large allocations with MPI_Win_allocate() to fail. Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from commit open-mpi/ompi@2409024) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent f0f6e87 commit 2baf6b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,10 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
517517

518518
if (MPI_WIN_FLAVOR_ALLOCATE == module->flavor) {
519519
for (int i = 0 ; i < local_size ; ++i) {
520-
total_size += temp[i].size;
521520
if (local_rank == i) {
522521
my_base_offset = total_size;
523522
}
523+
total_size += temp[i].size;
524524
}
525525
}
526526

0 commit comments

Comments
 (0)