diff options
author | schnetter <schnetter@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2005-03-20 17:10:45 +0000 |
---|---|---|
committer | schnetter <schnetter@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2005-03-20 17:10:45 +0000 |
commit | be8584e58f4dec39fc3f209ca1126908598398e4 (patch) | |
tree | 2fd2c1be6087f6044778ab62ce0f91df5e0bfe84 | |
parent | 28cb74923985e842de6b80c227ccb6cedf28ce70 (diff) |
Implement the option "PUGH::local_size_includes_ghosts", which allows
specifying the processor-local unghosted grid size -- this is the grid
size that should stay constant for a parallel performance test.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@460 b61c5cb5-eaca-4651-9a7a-d64986f99364
-rw-r--r-- | param.ccl | 4 | ||||
-rw-r--r-- | src/SetupPGV.c | 17 |
2 files changed, 17 insertions, 4 deletions
@@ -107,6 +107,10 @@ INT local_nsize "The size of the grid in each spatial direction" -1:* :: "Grid of this size in each dir on each processor" } -1 +BOOLEAN local_size_includes_ghosts "Does the local grid size include the ghost zones?" +{ +} "yes" + BOOLEAN enable_all_storage "Enable storage for all GFs?" { } "no" 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) { |