aboutsummaryrefslogtreecommitdiff
path: root/src/GHExtension.c
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-06-14 16:46:53 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-06-14 16:46:53 +0000
commit63815410954f7a8cc19bfaaf9ddc5ea3a8db2463 (patch)
treeb8b953cc09358a26d8995ca1191525d6f8ffed1b /src/GHExtension.c
parent6bbd2b0ad4481a7c4e9b2ecc32e2efc1d755cbab (diff)
Enabled PUGH to synchronize groups of arrays in one communication call
rather than doing it sequentially on individual arrays. Nothing changes for the CCTK routines overloaded by PUGH. For BAM and other thorns which don't care about groups there is now a separate interface to synchronize individual arrays. Also eliminated the restriction to synchronize 1D and 3D arrays only - now it should do arbitrary dims (not yet tested). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@222 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/GHExtension.c')
-rw-r--r--src/GHExtension.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c
index 7d9bfcc..23627ff 100644
--- a/src/GHExtension.c
+++ b/src/GHExtension.c
@@ -80,13 +80,8 @@ void *PUGH_SetupGH(tFleshConfig *config,
CCTK_WARN(0,"Failed to allocate memory for a pGH");
}
- /* Set the identity for this pGH. */
-
- /* FIXME : should be a dynamically allocated string.
- * If you change this, please change the line in pugh.h.
- */
-
- strcpy(newGH->identity_string, "");
+ /* Set the identity for this pGH. For now this is an empty string. */
+ newGH->identity_string = (char *) calloc (1, sizeof (char *));
/* Set up groups on the GH */
@@ -186,7 +181,7 @@ static void PUGH_InitGHBasics (cGH *GH)
pGH *mypGH;
pGExtras *GFExtras;
- mypGH = (pGH *)GH->extensions[pugh_GHExtension];
+ mypGH = PUGH_pGH(GH);
GFExtras = mypGH->GFExtras[GH->cctk_dim-1];
GH->cctk_convlevel = 0;
@@ -207,7 +202,7 @@ static void PUGH_InitGHBasics (cGH *GH)
{
GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)] = GH->cctk_lsh[idir];
if ((GH->cctk_bbox[2*idir+1]==1) && (istag>0))
- GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)]--;
+ GH->cctk_lssh[CCTK_LSSH_IDX(istag,idir)]--;
}
}
}
@@ -236,7 +231,7 @@ static void PUGH_InitGHVariables (cGH *GH)
pGH *mypGH;
- mypGH = (pGH *)GH->extensions[pugh_GHExtension];
+ mypGH = PUGH_pGH(GH);
for(var = 0; var < mypGH->nvariables; var++)
{