aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-10-28 14:46:17 +0000
committerallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-10-28 14:46:17 +0000
commitda1336fd54a0683c9e0bffd309d2df44ea753afe (patch)
treea55fe08b65a3348a8dec04f49413967fa18b6378
parentdc358f1b9e33122f4bf9589b671bfbec14356846 (diff)
Added new internal pugh function for providing the processor topology for GFs of
a given dimension. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@356 b61c5cb5-eaca-4651-9a7a-d64986f99364
-rw-r--r--src/PughUtils.c23
-rw-r--r--src/include/pugh.h2
2 files changed, 25 insertions, 0 deletions
diff --git a/src/PughUtils.c b/src/PughUtils.c
index d935cd3..b743bcc 100644
--- a/src/PughUtils.c
+++ b/src/PughUtils.c
@@ -41,6 +41,29 @@ int PUGH_QueryGroupStorage (cGH *GH, int group, const char *groupname);
void CCTK_FCALL CCTK_FNAME (PUGH_PrintStorage)
(cGH *cctkGH);
+ /*@@
+ @routine PUGH_Topology
+ @date Sunday 28 October 2001
+ @author Gabrielle Allen
+ @desc
+ Return the processor topology for grid functions for a given dimension
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+
+int *PUGH_Topology(cGH *GH,int dim)
+{
+ pGH *pughGH;
+
+ pughGH = PUGH_pGH(GH);
+
+ return pughGH->Connectivity[dim-1]->nprocs;
+}
/*@@
@routine PUGH_Report
diff --git a/src/include/pugh.h b/src/include/pugh.h
index 09deef2..c656652 100644
--- a/src/include/pugh.h
+++ b/src/include/pugh.h
@@ -159,6 +159,8 @@ int PUGH_nProcs(cGH *GH);
int PUGH_Exit(cGH *GH, int retval);
+int *PUGH_Topology(cGH *GH, int dim);
+
#ifdef CCTK_MPI
MPI_Datatype PUGH_MPIDataType (pGH *pughGH, int cctk_type);
#endif