diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2003-03-31 09:57:55 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2003-03-31 09:57:55 +0000 |
commit | e1e360bfcd248d93330e8922751e8e2f91d0cd7e (patch) | |
tree | 0a058ae2b38df2a0942812c2f0d13d55989bb57f | |
parent | edfddf3ecad5377221c16ee6caa2988675b207bd (diff) |
Fixed domain decomposition of 'DISTRIB=const' arrays. Now it also parallelizes
if the (local) size is greater than the number of ghostzones.
This fixes PR CactusPUGH/1425 (where nghostzones was set to 0 and the size set
to 1).
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@409 b61c5cb5-eaca-4651-9a7a-d64986f99364
-rw-r--r-- | src/SetupGroup.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/SetupGroup.c b/src/SetupGroup.c index c2a8bab..346da2a 100644 --- a/src/SetupGroup.c +++ b/src/SetupGroup.c @@ -97,6 +97,8 @@ static int PUGH_SetupScalarGroup (pGH *newGH, void *temp; + (void) (vectorgroup + 0); + retval = 0; /* PUGH_SUCCESS */ temp = realloc (newGH->variables, @@ -256,8 +258,8 @@ static int PUGH_SetupGAGroup (pGH *newGH, { /* Arrays can't (yet) have periodicity and manual setup, so initialize them to zero */ - perme = (int *) calloc (dim, sizeof (int)); - nprocs = (int *) calloc (dim, sizeof (int)); + perme = calloc (dim, sizeof (int)); + nprocs = calloc (dim, sizeof (int)); if (! (perme && nprocs)) { CCTK_WARN (0, "Memory allocation error in PUGH_SetupGAGroup"); @@ -268,7 +270,7 @@ static int PUGH_SetupGAGroup (pGH *newGH, */ for (i = 0 ; i < dim; i++) { - if (! nprocs[i] && abs (nsize[i]) <= 2*ghostsize[i] + 1) + if (abs (nsize[i]) <= 2*ghostsize[i]) { nprocs[i] = 1; } |