aboutsummaryrefslogtreecommitdiff
path: root/src/SetupGroup.c
diff options
context:
space:
mode:
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])
{