aboutsummaryrefslogtreecommitdiff
path: root/src/SetupGroup.c
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2003-12-01 22:50:36 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2003-12-01 22:50:36 +0000
commitce1bd89ec14535514c529b28c381a3c3e841526b (patch)
tree793674a51ce830af8a34a09d5f544c5d99d34c78 /src/SetupGroup.c
parentf6a8262ccb22d44d19707bf25b39ebbe30f6c66a (diff)
Bug was discovered by Fokke Dijkstra: manual partitioning settings was
applied to both grid function and grid array variables. Should be done only for grid functions, of course. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@424 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupGroup.c')
-rw-r--r--src/SetupGroup.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/SetupGroup.c b/src/SetupGroup.c
index 1e91bc4..79c4da0 100644
--- a/src/SetupGroup.c
+++ b/src/SetupGroup.c
@@ -159,14 +159,8 @@ static int PUGH_SetupGAGroup (pGH *newGH,
connectivity = PUGH_SetupConnectivity (dim, newGH->nprocs, nprocs, perme);
- extras = PUGH_SetupPGExtras (dim,
- perme,
- staggercode,
- nsize,
- ghostsize,
- newGH->nprocs,
- connectivity->nprocs,
- newGH->myproc);
+ extras = PUGH_SetupPGExtras (0, dim, perme, staggercode, nsize, ghostsize,
+ newGH->nprocs, connectivity->nprocs, newGH->myproc);
free (nprocs);
free (perme);
@@ -181,6 +175,7 @@ static int PUGH_SetupGAGroup (pGH *newGH,
/* Set up the communication buffer used for all variables within this group.
Note: only with allocated buffers we can have group communication. */
+ groupcomm = NULL;
if(newGH->commmodel == PUGH_ALLOCATEDBUFFERS)
{
groupcomm = PUGH_SetupGArrayGroupComm (newGH,
@@ -191,22 +186,17 @@ static int PUGH_SetupGAGroup (pGH *newGH,
vtype,
extras);
}
- else
- {
- groupcomm = NULL;
- }
-
- temp = (void ***) realloc (newGH->variables, (newGH->nvariables+n_variables) *
- sizeof (void **));
+ temp = realloc (newGH->variables, (newGH->nvariables+n_variables) *
+ sizeof (void **));
if(temp)
{
newGH->variables = temp;
for (variable = 0; variable < n_variables; variable++)
{
- newGH->variables[newGH->nvariables] = (void **) malloc (n_timelevels *
- sizeof (void *));
+ newGH->variables[newGH->nvariables] = malloc (n_timelevels *
+ sizeof (void *));
if (newGH->variables[newGH->nvariables])
{