diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/SetupPGV.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c index 3530a05..6e01908 100644 --- a/src/SetupPGV.c +++ b/src/SetupPGV.c @@ -17,6 +17,7 @@ #include <string.h> #include "cctk.h" +#include "cctk_Parameters.h" #include "pugh.h" #include "pughi.h" @@ -812,6 +813,7 @@ static int PUGH_SetupPGExtrasSizes(int is_gf, int this_proc, pGExtras *this) { + DECLARE_CCTK_PARAMETERS; int dir; int maxpoints, minpoints, avgpoints,proc; @@ -819,11 +821,18 @@ static int PUGH_SetupPGExtrasSizes(int is_gf, for (dir=0 ; dir < dim ; dir++) { /* A -ve size means constant load per proc */ - if (sh[dir] < 0 && nprocs[dir] > 1) + if (sh[dir] < 0) { - this->nsize[dir] = (nprocs[dir]-2) * - (-sh[dir] - 2*nghosts[dir]) + - 2 * (-sh[dir] - nghosts[dir]); + if (local_size_includes_ghosts) + { + this->nsize[dir] = (nprocs[dir]-2) * + (-sh[dir] - 2*nghosts[dir]) + + 2 * (-sh[dir] - nghosts[dir]); + } + else + { + this->nsize[dir] = nprocs[dir] * (-sh[dir]); + } if (stagger == PUGH_STAGGER) { |