From 22e270a7b773aa21fedbe3595cbab23939922356 Mon Sep 17 00:00:00 2001 From: schnetter Date: Sun, 16 May 2004 13:54:53 +0000 Subject: 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 --- interface.ccl | 3 +-- schedule.ccl | 14 ++++++-------- src/Output.c | 22 ++++++++++++++++++++++ 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; +} -- cgit v1.2.3