Timing routines
REVISION HISTORY:
author: Tony Craig, NCARINTERFACE:
module ice_timersDESCRIPTION:
Timing routines
REVISION HISTORY:
author: Tony Craig, NCARUSES:
use ice_kinds_mod
use ice_constants
implicit none
INTERFACE:
subroutine ice_timer_clear(n)DESCRIPTION:
Initialize timer n to 0
if n = -1 initialize all timers
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: n
INTERFACE:
subroutine ice_timer_start(n)DESCRIPTION:
Begin timing with timer n
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: n
INTERFACE:
subroutine ice_timer_stop(n)DESCRIPTION:
End (or pause) timing with timer n
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: n
INTERFACE:
subroutine ice_timer_print(n)DESCRIPTION:
Print timing results of timer n
if n = -1 print timing results of all timers
REVISION HISTORY:
author: Tony Craig, NCARUSES:
use ice_domain
use ice_mpi_internal
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind), intent(in) :: n
INTERFACE:
subroutine timers(t1)DESCRIPTION:
Do the work
REVISION HISTORY:
author: Tony Craig, NCARUSES:
#ifdef _MPI
include "mpif.h" ! MPI library definitions
#else
#ifdef Linux
integer (kind=int_kind) ::
& count ! current count of the system clock
&, count_rate ! number of clock ticks per second
#else
real (kind=dbl_kind) :: rtc
integer (kind=int_kind) :: rate,irtc_rate
#endif
#endif
INPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind), intent(out) :: t1