From 2409024c179f3261a52e8007487a52a50fc5799b Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 21 Jun 2016 09:50:29 -0600 Subject: [PATCH] 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 --- ompi/mca/osc/rdma/osc_rdma_component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/osc/rdma/osc_rdma_component.c b/ompi/mca/osc/rdma/osc_rdma_component.c index 2fa786b477..8b52933007 100644 --- a/ompi/mca/osc/rdma/osc_rdma_component.c +++ b/ompi/mca/osc/rdma/osc_rdma_component.c @@ -517,10 +517,10 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s if (MPI_WIN_FLAVOR_ALLOCATE == module->flavor) { for (int i = 0 ; i < local_size ; ++i) { - total_size += temp[i].size; if (local_rank == i) { my_base_offset = total_size; } + total_size += temp[i].size; } }