aboutsummaryrefslogtreecommitdiff
path: root/src/PughUtils.c
diff options
context:
space:
mode:
authorallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-09-16 10:13:01 +0000
committerallen <allen@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-09-16 10:13:01 +0000
commit46a7d6ef731e9e26279fab0514c91ad41fbac170 (patch)
tree9c4e4e639714a18cde9375456fa1a92652bb8c4a /src/PughUtils.c
parent5c1f3ae9d5de43fe1d47463222791b6cdb49dc47 (diff)
Extended storage_verbose parameter to give a report on the maximum amount of storage assigned during a run.
The options are now storage_verbose = "yes" -> show everything (enabling, disabling and report) storage_verbose = "report" -> just show report storage_verbose = "no" (the default) -> show nothing The report will be given at termination, and also at every storage_report_every iterations (default is only at termination). I could extend the report to give a list of the GAs with storage at the max if anyone wants that. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@346 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/PughUtils.c')
-rw-r--r--src/PughUtils.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/PughUtils.c b/src/PughUtils.c
index 449454f..c981f41 100644
--- a/src/PughUtils.c
+++ b/src/PughUtils.c
@@ -20,6 +20,8 @@ static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusPUGH_PUGH_PughUtils_c)
void PUGH_Report(CCTK_ARGUMENTS);
+void PUGH_PrintStorageReport (CCTK_ARGUMENTS);
+void PUGHi_PrintStorageReport (void);
/*@@
@routine PUGH_Report
@@ -216,3 +218,25 @@ MPI_Datatype PUGH_MPIDataType (pGH *pughGH, int cctk_type)
return (retval);
}
#endif /* CCTK_MPI */
+
+ /*@@
+ @routine PUGH_PrintStorageReport
+ @author Gabrielle Allen
+ @date 16th Sept 2001
+ @desc
+ Print a report about the use of storage
+ @enddesc
+@@*/
+void PUGH_PrintStorageReport (CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_PARAMETERS
+ DECLARE_CCTK_ARGUMENTS
+
+ if (storage_report_every > 0)
+ {
+ if (cctk_iteration % storage_report_every == 0)
+ {
+ PUGHi_PrintStorageReport();
+ }
+ }
+}