diff options
author | allen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 1999-10-18 11:45:01 +0000 |
---|---|---|
committer | allen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 1999-10-18 11:45:01 +0000 |
commit | 80accffb1ffacf9e435a3cabe5c53699e8c0835e (patch) | |
tree | acdb697998a4b37e4a974761392e022c2640833d /src/PughUtils.c | |
parent | ede6661271aa222e47d70525586fe6921d4fc7f0 (diff) |
PughUtils is ready for multidimensions
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@102 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/PughUtils.c')
-rw-r--r-- | src/PughUtils.c | 63 |
1 files changed, 53 insertions, 10 deletions
diff --git a/src/PughUtils.c b/src/PughUtils.c index 08f7786..83fd106 100644 --- a/src/PughUtils.c +++ b/src/PughUtils.c @@ -47,18 +47,61 @@ void pugh_Report(CCTK_CARGUMENTS) #endif CCTK_INFO(message); - sprintf(message,"Size: %d %d %d",pughGH->nsize[0],pughGH->nsize[1],pughGH->nsize[2]); - CCTK_INFO(message); + if (cctkGH->cctk_dim == 3) + { + + sprintf(message,"Size: %d %d %d",pughGH->nsize[0],pughGH->nsize[1],pughGH->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]); + CCTK_INFO(message); + sprintf(message,"Local load: %d [%d x %d x %d]", + pughGH->npoints,pughGH->lnsize[0], pughGH->lnsize[1], pughGH->lnsize[2]); + +#endif + } + else if (cctkGH->cctk_dim == 2) + { + + sprintf(message,"Size: %d %d",pughGH->nsize[0],pughGH->nsize[1]); + CCTK_INFO(message); #ifdef MPI - sprintf(message,"Processor topology: %d x %d x %d", - pughGH->nproc[0], pughGH->nproc[1], pughGH->nproc[2]); - CCTK_INFO(message); - sprintf(message,"Local load: %d [%d x %d x %d]", - pughGH->npoints,pughGH->lnsize[0], pughGH->lnsize[1], pughGH->lnsize[2]); - CCTK_INFO(message); - sprintf(message,"Maximum load skew: %f",pughGH->maxskew); - CCTK_INFO(message); + sprintf(message,"Processor topology: %d x %d", + pughGH->nproc[0], pughGH->nproc[1]); + CCTK_INFO(message); + sprintf(message,"Local load: %d [%d x %d]", + pughGH->npoints,pughGH->lnsize[0], pughGH->lnsize[1]); + +#endif + + } + else if (cctkGH->cctk_dim == 1) + { + + sprintf(message,"Size: %d",pughGH->nsize[0]); + CCTK_INFO(message); + +#ifdef MPI + sprintf(message,"Processor topology: %d",pughGH->nproc[0]); + CCTK_INFO(message); + sprintf(message,"Local load: %d [%d]", + pughGH->npoints,pughGH->lnsize[0]); + +#endif + + } + else + { + CCTK_WARN(4,"Only 1D, 2D, and 3D supported in pugh_Report"); + } + +#ifdef MPI + CCTK_INFO(message); + sprintf(message,"Maximum load skew: %f",pughGH->maxskew); + CCTK_INFO(message); #endif free(message); |