aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@d0051148-8e13-4bef-be1d-f6c572c85f9f>2004-12-14 18:00:46 +0000
committertradke <tradke@d0051148-8e13-4bef-be1d-f6c572c85f9f>2004-12-14 18:00:46 +0000
commit172c609cef493c8a99701b02c66151da7d669490 (patch)
treebe9e90e8b835e837190108958a630e38f77f556f
parentfb54fd1c3193cd178772d61750b3b82db536bfdd (diff)
Check for division by 0.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/TimerReport/trunk@13 d0051148-8e13-4bef-be1d-f6c572c85f9f
-rw-r--r--src/Output.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Output.c b/src/Output.c
index 35b45c5..eca295d 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -54,22 +54,21 @@ void TimerReport_Checkpoint(CCTK_ARGUMENTS);
@desc
Output the timer table
@enddesc
- @calls
@@*/
void TimerReport_Output(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
- if (next || out_at == cctk_iteration || cctk_iteration%out_every == 0)
+ if (next || out_at == cctk_iteration || (out_every && cctk_iteration%out_every == 0))
{
CCTK_VInfo(CCTK_THORNSTRING,
"Timer Report at iteration %d time %g",
cctk_iteration, (double)cctk_time);
CCTK_SchedulePrintTimes(NULL);
-
- if (next)
+
+ if (next)
{
CCTK_ParameterSet("next", CCTK_THORNSTRING, "no");
}
@@ -84,7 +83,6 @@ void TimerReport_Output(CCTK_ARGUMENTS)
@desc
Output the timer table if before_checkpoint is set
@enddesc
- @calls
@@*/
void TimerReport_Checkpoint(CCTK_ARGUMENTS)
{