aboutsummaryrefslogtreecommitdiff
path: root/src/SetupPGV.c
diff options
context:
space:
mode:
authorallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-10-28 08:34:16 +0000
committerallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-10-28 08:34:16 +0000
commitdc358f1b9e33122f4bf9589b671bfbec14356846 (patch)
tree006cf6897359a5d2fa12ae61b64a3709cb984ddd /src/SetupPGV.c
parent363425eb520803a5a4f11b9fe5aed36cecc6becd (diff)
Filled out the maxskew variable which wasn't being set.
Also added a private parameter "info", at the moment it can take the values none or load, if load is chosen it shows the actual load on each processor. I want to add more options for printing out the local domain etc on each processor. Documented the maxskew variable, and how to spot if you are using MPI or not. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@355 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupPGV.c')
-rw-r--r--src/SetupPGV.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c
index 86233c2..fe60968 100644
--- a/src/SetupPGV.c
+++ b/src/SetupPGV.c
@@ -851,6 +851,7 @@ int PUGH_SetupPGExtrasSizes(int dim,
pGExtras *this)
{
int dir;
+ int maxpoints, minpoints, avgpoints,proc;
/* Setup the global shape */
for (dir=0 ; dir < dim ; dir++)
@@ -910,6 +911,21 @@ int PUGH_SetupPGExtrasSizes(int dim,
this->npoints = this->rnpoints[this_proc];
+ /* Set up the maxskew */
+
+ maxpoints=this->npoints;
+ minpoints=this->npoints;
+ avgpoints=0;
+ for (proc = 0; proc < total_procs; proc++)
+ {
+ maxpoints = (maxpoints<this->rnpoints[proc]) ? this->rnpoints[proc] : maxpoints;
+ minpoints = (minpoints>this->rnpoints[proc]) ? this->rnpoints[proc] : minpoints;
+ avgpoints += this->rnpoints[proc];
+ }
+ avgpoints = avgpoints/total_procs;
+
+ this->maxskew = 100*(maxpoints-minpoints)/avgpoints;
+
return 0;
}