aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@d0051148-8e13-4bef-be1d-f6c572c85f9f>2004-05-16 13:54:53 +0000
committerschnetter <schnetter@d0051148-8e13-4bef-be1d-f6c572c85f9f>2004-05-16 13:54:53 +0000
commit22e270a7b773aa21fedbe3595cbab23939922356 (patch)
tree03c008650ed8d76cfb982052f429bcb90bb013f9
parent09e953d73565c8a0d19c53098db7b2a678faeb2f (diff)
Remove triggervar.
Schedule regular and pre-checkpoint timer output as different routines, because if-conditions in schedule files are evaluated only at startup. Also schedule timer output in global mode. Also schedule them with a name that is likely to make them execute last. git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/TimerReport/trunk@7 d0051148-8e13-4bef-be1d-f6c572c85f9f
-rw-r--r--interface.ccl3
-rw-r--r--schedule.ccl14
-rw-r--r--src/Output.c22
3 files changed, 29 insertions, 10 deletions
diff --git a/interface.ccl b/interface.ccl
index 0210e53..47dd0db 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -8,6 +8,5 @@ private:
int triggergroup type=SCALAR
{
-triggervar
+ triggervar
} "For triggering output"
-
diff --git a/schedule.ccl b/schedule.ccl
index 6a1be64..3a40bff 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -7,16 +7,14 @@ SCHEDULE TimerReport_Startup AT CCTK_STARTUP
LANG: C
} "Startup routine"
-SCHEDULE TimerReport_Output AT CCTK_ANALYSIS
+SCHEDULE TimerReport_Output AS zzz_TimerReport_Output AT CCTK_ANALYSIS
{
LANG: C
- TRIGGERS: triggergroup
+ OPTIONS: global
} "Print the timer report"
-if (before_checkpoint)
+SCHEDULE TimerReport_Checkpoint AS zzz_TimerReport_Checkpoint AT CCTK_CHECKPOINT
{
- SCHEDULE TimerReport_Output AT CCTK_CHECKPOINT
- {
- LANG: C
- } "Print the timer report"
-} \ No newline at end of file
+ LANG: C
+ OPTIONS: global
+} "Print the timer report"
diff --git a/src/Output.c b/src/Output.c
index 226ecb5..fcb39c7 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -141,3 +141,25 @@ void TimerReport_Output(CCTK_ARGUMENTS)
return;
}
+
+ /*@@
+ @routine TimerReport_Checkpoint
+ @date April 10 2004
+ @author Erik Schnetter
+ @desc
+ Output the timer table if before_checkpoint is set
+ @enddesc
+ @calls
+@@*/
+void TimerReport_Checkpoint(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_PARAMETERS
+
+ if (before_checkpoint)
+ {
+ CCTK_SchedulePrintTimes(NULL);
+ }
+
+ return;
+}