From c57a10ff76beb3120622983b17ec0db38c038383 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 30 Apr 2015 14:02:13 +0200 Subject: [PATCH] [bugfix] Use full set of processes to determine whether to redistribute or not. Previously we used the size of the communicator within the CpGrid to check whether we are running in parallel and need to redistribute the grid. Unfortunately, this is MPI_COMM_SELF until we actually loadbalance and redistribute. Therefore we now use the size of the MPI_Helper (i.e. MPI_COMM_WORLD) which gives us the number of all available processes. Note that the wrong behaviour was provoked with 656e5de3310. Before that we redistributed in any case which luckily included runs with more than 1 process. --- examples/flow_cp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/flow_cp.cpp b/examples/flow_cp.cpp index 0ebf5c40f..79d66468a 100644 --- a/examples/flow_cp.cpp +++ b/examples/flow_cp.cpp @@ -266,7 +266,7 @@ try // At this point all properties and state variables are correctly initialized // If there are more than one processors involved, we now repartition the grid // and initilialize new properties and states for it. - bool must_distribute = ( grid->comm().size() > 1 ); + bool must_distribute = ( mpi_helper.size() > 1 ); if( must_distribute ) { if( param.getDefault("output_matlab", false) || param.getDefault("output_ecl", true) )