diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-10-31 12:05:01 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-10-31 12:05:01 +0000 |
commit | 3c2d7c8ae5f322d135e3cf344e8d07af107eb95b (patch) | |
tree | 6a53588b10622db65b1f336b1f4c080f92ce6dd7 /src/SetupPGH.c | |
parent | da1336fd54a0683c9e0bffd309d2df44ea753afe (diff) |
PUGH overloadables for CCTK_MyProc(), CCTK_nProcs(), CCTK_Barrier() take
a 'const cGH *' argument now.
Also fixed a couple of other warnings. Untabified sources.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@357 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupPGH.c')
-rw-r--r-- | src/SetupPGH.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/src/SetupPGH.c b/src/SetupPGH.c index f9b05e4..4abb52e 100644 --- a/src/SetupPGH.c +++ b/src/SetupPGH.c @@ -2,9 +2,9 @@ @file SetupPGH.c @date Fri Feb 21 10:18:17 1997 @author Paul Walker - @desc - Initializes the Pugh Grid Hierachy. - @enddesc + @desc + Initializes the Pugh Grid Hierachy. + @enddesc @version $Id$ @@*/ @@ -38,12 +38,12 @@ static int Setup_nProcs (pGH *pughGH, int dim); @routine PUGH_SetupPGH @date Fri Feb 21 10:21:36 1997 @author Gabrielle Allen, Tom Goodale, Paul Walker - @desc + @desc Sets up the PGH distribution based on processor number and problem size. This includes setting an optimal domain decomposition for each dimension, and setting ghosts and overlaps. - @enddesc + @enddesc @var callerid @vdesc back reference to the calling cGH structure @@ -81,12 +81,12 @@ static int Setup_nProcs (pGH *pughGH, int dim); the pointer to the new pGH structure @endreturndesc @@*/ -pGH *PUGH_SetupPGH (void *callerid, - int dim, - int *nsize, +pGH *PUGH_SetupPGH (void *callerid, + int dim, + int *nsize, int *nghostzones, int staggertype, - int *perme) + int *perme) { DECLARE_CCTK_PARAMETERS pGH *pughGH; @@ -127,7 +127,7 @@ pGH *PUGH_SetupPGH (void *callerid, pughGH->Connectivity[idim-1] = PUGH_SetupConnectivity (idim, pughGH->nprocs, nprocs, perme); free(nprocs); - + pughGH->GFExtras[idim-1] = PUGH_SetupPGExtras (idim, perme, staggertype, nsize, nghostzones, pughGH->nprocs, @@ -186,9 +186,9 @@ int PUGH_Terminate (cGH *GH) @routine PUGH_DestroyPGH @date Thu Aug 21 11:38:10 1997 @author Paul Walker - @desc + @desc Destroys a GH object. - @enddesc + @enddesc @var GHin @vdesc address of PUGH GH extensions object to be destroyed @@ -196,7 +196,7 @@ int PUGH_Terminate (cGH *GH) @vio in @endvar @@*/ -void PUGH_DestroyPGH (pGH **GHin) +void PUGH_DestroyPGH (pGH **GHin) { pGH *GH; pGA *GA; @@ -231,7 +231,7 @@ void PUGH_DestroyPGH (pGH **GHin) #ifdef DEBUG_PUGH printf("Calling Destroying Group %s\n", CCTK_GroupName(group)); fflush(stdout); -#endif +#endif CCTK_GroupData(group,&pgroup); @@ -263,7 +263,7 @@ void PUGH_DestroyPGH (pGH **GHin) } } - for (this_var = 0; this_var < pgroup.numvars; this_var++, variable++) + for (this_var = 0; this_var < pgroup.numvars; this_var++, variable++) { for(i = 0 ; i < pgroup.numtimelevels; i++) { @@ -307,7 +307,7 @@ void PUGH_DestroyPGH (pGH **GHin) @routine PUGH_SetupDefaultTopology @date Sun 23 Jan 1999 @author Gabrielle Allen - @desc + @desc Set the processor decomposition from PUGH parameters. @enddesc @@ -487,7 +487,7 @@ int PUGH_Abort (cGH *GH, int retval) @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @@ -496,7 +496,7 @@ int PUGH_Abort (cGH *GH, int retval) the processor number of the caller @endreturndesc @@*/ -int PUGH_MyProc (cGH *GH) +int PUGH_MyProc (const cGH *GH) { int myproc; @@ -505,6 +505,7 @@ int PUGH_MyProc (cGH *GH) CACTUS_MPI_ERROR (MPI_Comm_rank (GH ? PUGH_pGH (GH)->PUGH_COMM_WORLD : MPI_COMM_WORLD, &myproc)); #else + GH = GH; myproc = 0; #endif @@ -523,7 +524,7 @@ int PUGH_MyProc (cGH *GH) @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @@ -532,7 +533,7 @@ int PUGH_MyProc (cGH *GH) the total number of processors @endreturndesc @@*/ -int PUGH_nProcs (cGH *GH) +int PUGH_nProcs (const cGH *GH) { int nprocs; @@ -541,6 +542,7 @@ int PUGH_nProcs (cGH *GH) CACTUS_MPI_ERROR (MPI_Comm_size (GH ? PUGH_pGH (GH)->PUGH_COMM_WORLD : MPI_COMM_WORLD, &nprocs)); #else + GH = GH; nprocs = 1; #endif @@ -549,7 +551,7 @@ int PUGH_nProcs (cGH *GH) #if 0 -void pGH_DumpInfo(pGH *GH) +void pGH_DumpInfo(pGH *GH) { int i,j,k; printf("INFO: \n"); @@ -626,7 +628,7 @@ static int Setup_nProcs (pGH *pughGH, int dim) CCTK_REAL4 sum_sizes [2], compiled_sizes [2]; - /* Set up my communicator. This would allow us to run pugh on + /* Set up my communicator. This would allow us to run pugh on a subset of processors at a later date if, for instance, we were using panda or what not. */ |