From e1e360bfcd248d93330e8922751e8e2f91d0cd7e Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 31 Mar 2003 09:57:55 +0000 Subject: 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 --- src/SetupGroup.c | 8 +++++--- 1 file 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; } -- cgit v1.2.3