aboutsummaryrefslogtreecommitdiff
path: root/src/PughUtils.c
diff options
context:
space:
mode:
authorallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>1999-09-21 13:03:25 +0000
committerallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>1999-09-21 13:03:25 +0000
commit2a37f43847348c45e911202b504b84ade0a0b0d5 (patch)
tree437fe07b92cfe55e80cf52caf102934fcbf11c5a /src/PughUtils.c
parent6e9b7d8218240a89cbe9a842daa351b6f926e0f7 (diff)
Prints info to screen
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@91 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/PughUtils.c')
-rw-r--r--src/PughUtils.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/PughUtils.c b/src/PughUtils.c
new file mode 100644
index 0000000..4f53ff8
--- /dev/null
+++ b/src/PughUtils.c
@@ -0,0 +1,66 @@
+ /*@@
+ @file pugh_utils.c
+ @date Sunday 12th September 1999
+ @author Gabrielle Allen
+ @desc
+ @enddesc
+ @@*/
+
+#include <malloc.h>
+
+#include "cctk.h"
+#include "cctk_arguments.h"
+#include "cctk_parameters.h"
+
+#include "pugh.h"
+
+
+ /*@@
+ @routine pugh_Report
+ @date Sunday 12 September 1999
+ @author Gabrielle Allen
+ @desc
+ Report on PUGH set up
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+
+void pugh_Report(CCTK_CARGUMENTS)
+{
+
+ pGH *pughGH; /* PUGH extension handle */
+ char *message;
+
+ pughGH = ((pGH *) cctkGH->extensions [CCTK_GHExtensionHandle ("PUGH")]);
+
+ message = malloc(1024*sizeof(char));
+
+#ifdef MPI
+ sprintf(message,"MPI Evolution on %d processors",pughGH->nprocs);
+#else
+ sprintf(message,"Single processor evolution");
+#endif
+ CCTK_INFO(message);
+
+ sprintf(message,"Size: %d %d %d",pughGH->nx,pughGH->ny,pughGH->nz);
+ CCTK_INFO(message);
+
+#ifdef MPI
+ sprintf(message,"Processor topology: %d x %d x %d",
+ pughGH->nprocx, pughGH->nprocy, pughGH->nprocz);
+ CCTK_INFO(message);
+ sprintf(message,"Local load: %d [%d x %d x %d]",
+ pughGH->npoints,pughGH->lnx, pughGH->lny, pughGH->lnz);
+ CCTK_INFO(message);
+ sprintf(message,"Maximum load skew: %f",pughGH->maxskew);
+ CCTK_INFO(message);
+#endif
+
+ free(message);
+
+}