/*@@ @file Output.c @date July 6 2003 @author Gabrielle Allen @desc Functions to report the timers @enddesc @version $Id$ @@*/ #include #include "cctk.h" #include "cctk_Parameters.h" #include "cctk_Arguments.h" #include "cctk_Schedule.h" static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusUtils_TimerReport_Output_c) /******************************************************************** ********************* Local Data Types *********************** ********************************************************************/ /******************************************************************** ********************* Local Routine Prototypes ********************* ********************************************************************/ /******************************************************************** ********************* Other Routine Prototypes ********************* ********************************************************************/ /******************************************************************** ********************* Local Data ***************************** ********************************************************************/ /******************************************************************** ******************** External Routines ************************ ********************************************************************/ /******************************************************************** ******************** Internal Routines ************************ ********************************************************************/ /*@@ @routine TimerReport_Output @date July 6 2003 @author Gabrielle Allen @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) { CCTK_VInfo(CCTK_THORNSTRING, "Timer Report at iteration %d time %g", cctk_iteration, (double)cctk_time); CCTK_SchedulePrintTimes(NULL); if (next) { CCTK_ParameterSet("next", CCTK_THORNSTRING, "no"); } } } /*@@ @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_VInfo(CCTK_THORNSTRING, "Timer Report before checkpointing at iteration %d, time %g", cctk_iteration, (double)cctk_time); CCTK_SchedulePrintTimes(NULL); } }