aboutsummaryrefslogtreecommitdiff
path: root/src/PughUtils.c
diff options
context:
space:
mode:
authorallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-03-23 15:18:57 +0000
committerallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2000-03-23 15:18:57 +0000
commit3641f4c7513fffd1f0d026f1a859ecaa78712682 (patch)
tree322b86eeaf723d4940ffaff81d5b02819146d39c /src/PughUtils.c
parenta5844c641aa3c1b179d0176acf16fcd3607d439c (diff)
Major changes to PUGH as the dearly loved pGF is removed, and a grid function
is lowered to being simply a special case of a grid array, pGA. Grid arrays can all have different sizes, which means that now the size of a GA is moved from the GH to a structure on the GA, along with a lot of other connectivity and additional information which was formerly on the GH. If you need to care about these changes, take a look at the files in src/include/pGH.h and src/include/pGA.h, to see the new structures (I'll leave the old files pGF.h and SetupPGF.c around for a while to compare with). Also, look at a PUGH dependent file which has already been converted, such as CactusPUGHIO/IOASCII/src/Write1D.c. Warning: This commit breaks the development versions of IOHDF5 and IsoSurfacer, these will be fixed real quick. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@182 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/PughUtils.c')
-rw-r--r--src/PughUtils.c45
1 files changed, 28 insertions, 17 deletions
diff --git a/src/PughUtils.c b/src/PughUtils.c
index 617860a..8b37cd5 100644
--- a/src/PughUtils.c
+++ b/src/PughUtils.c
@@ -36,14 +36,13 @@ void pugh_Report(CCTK_CARGUMENTS)
{
DECLARE_CCTK_PARAMETERS
- pGH *pughGH; /* PUGH extension handle */
+ pGH *pughGH;
char *message;
int i;
pughGH = pugh_pGH(cctkGH);
message = malloc(1024*sizeof(char));
-
#ifdef MPI
sprintf(message,"MPI Evolution on %d processors",pughGH->nprocs);
#else
@@ -54,28 +53,32 @@ void pugh_Report(CCTK_CARGUMENTS)
if (cctkGH->cctk_dim == 3)
{
- sprintf(message,"Size: %d %d %d",pughGH->nsize[0],pughGH->nsize[1],pughGH->nsize[2]);
+ sprintf(message,"Size: %d %d %d",pughGH->GFExtras[2]->nsize[0],pughGH->GFExtras[2]->nsize[1],pughGH->GFExtras[2]->nsize[2]);
CCTK_INFO(message);
#ifdef MPI
sprintf(message,"Processor topology: %d x %d x %d",
- pughGH->nproc[0], pughGH->nproc[1], pughGH->nproc[2]);
+ pughGH->Connectivity[2]->nprocs[0],
+ pughGH->Connectivity[2]->nprocs[1],
+ pughGH->Connectivity[2]->nprocs[2]);
CCTK_INFO(message);
if (CCTK_Equals(partition, "automatic")) {
sprintf(message,"Local load: %d [%d x %d x %d]",
- pughGH->npoints,
- pughGH->lnsize[0], pughGH->lnsize[1], pughGH->lnsize[2]);
+ pughGH->GFExtras[2]->npoints,
+ pughGH->GFExtras[2]->lnsize[0],
+ pughGH->GFExtras[2]->lnsize[1],
+ pughGH->GFExtras[2]->lnsize[2]);
CCTK_INFO(message);
} else { /* manual partition */
for (i=0; i<pughGH->nprocs; i++) {
sprintf(message,
"Local load on proc %d: %d [%d x %d x %d]",
i,
- pughGH->rnpoints[i],
- pughGH->rnsize[i][0],
- pughGH->rnsize[i][1],
- pughGH->rnsize[i][2]);
+ pughGH->GFExtras[2]->rnpoints[i],
+ pughGH->GFExtras[2]->rnsize[i][0],
+ pughGH->GFExtras[2]->rnsize[i][1],
+ pughGH->GFExtras[2]->rnsize[i][2]);
CCTK_INFO(message);
}
}
@@ -84,15 +87,20 @@ void pugh_Report(CCTK_CARGUMENTS)
else if (cctkGH->cctk_dim == 2)
{
- sprintf(message,"Size: %d %d",pughGH->nsize[0],pughGH->nsize[1]);
+ sprintf(message,"Size: %d %d",
+ pughGH->GFExtras[1]->nsize[0],
+ pughGH->GFExtras[1]->nsize[1]);
CCTK_INFO(message);
#ifdef MPI
sprintf(message,"Processor topology: %d x %d",
- pughGH->nproc[0], pughGH->nproc[1]);
+ pughGH->Connectivity[1]->nprocs[0],
+ pughGH->Connectivity[1]->nprocs[1]);
CCTK_INFO(message);
sprintf(message,"Local load: %d [%d x %d]",
- pughGH->npoints,pughGH->lnsize[0], pughGH->lnsize[1]);
+ pughGH->GFExtras[1]->npoints,
+ pughGH->GFExtras[1]->lnsize[0],
+ pughGH->GFExtras[1]->lnsize[1]);
CCTK_INFO(message);
#endif
@@ -100,14 +108,16 @@ void pugh_Report(CCTK_CARGUMENTS)
else if (cctkGH->cctk_dim == 1)
{
- sprintf(message,"Size: %d",pughGH->nsize[0]);
+ sprintf(message,"Size: %d",pughGH->GFExtras[0]->nsize[0]);
CCTK_INFO(message);
#ifdef MPI
- sprintf(message,"Processor topology: %d",pughGH->nproc[0]);
+ sprintf(message,"Processor topology: %d",
+ pughGH->Connectivity[0]->nprocs[0]);
CCTK_INFO(message);
sprintf(message,"Local load: %d [%d]",
- pughGH->npoints,pughGH->lnsize[0]);
+ pughGH->GFExtras[0]->npoints,
+ pughGH->GFExtras[0]->lnsize[0]);
CCTK_INFO(message);
#endif
@@ -118,7 +128,8 @@ void pugh_Report(CCTK_CARGUMENTS)
}
#ifdef MPI
- sprintf(message,"Maximum load skew: %f",pughGH->maxskew);
+ sprintf(message,"Maximum load skew: %f",
+ pughGH->GFExtras[pughGH->dim-1]->maxskew);
CCTK_INFO(message);
#endif