aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@b61c5cb5-eaca-4651-9a7a-d64986f99364>2005-03-20 17:10:45 +0000
committerschnetter <schnetter@b61c5cb5-eaca-4651-9a7a-d64986f99364>2005-03-20 17:10:45 +0000
commitbe8584e58f4dec39fc3f209ca1126908598398e4 (patch)
tree2fd2c1be6087f6044778ab62ce0f91df5e0bfe84
parent28cb74923985e842de6b80c227ccb6cedf28ce70 (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.ccl4
-rw-r--r--src/SetupPGV.c17
2 files changed, 17 insertions, 4 deletions
diff --git a/param.ccl b/param.ccl
index fa90b86..7aea25b 100644
--- a/param.ccl
+++ b/param.ccl
@@ -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)
{