Subroutine to stop a timer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | |||
integer, | intent(in) | :: | timer |
subroutine end_timer(pf, timer)
type(pf_pfasst_t), intent(inout) :: pf
integer, intent(in) :: timer
integer :: t, rate
call system_clock(t, rate)
pf%runtimes(timer) = pf%runtimes(timer) + t - pf%timers(timer)
if (pf%echo_timings) then
write(601+pf%rank, '("timer:",a16,", rank: ",i3,", step: ",i4, ", level: ", i3,' &
// '", iter: ",i3,", cycle: ",i3,", time (rate ",i12,"Hz): ",i18,i18,i18,i18)') &
timer_names(timer), pf%rank, &
pf%state%step, pf%state%level, pf%state%iter, pf%state%cycle, rate, &
t-pf%timers(timer), t-pf%timers(TTOTAL), pf%timers(timer), t
call flush(601+pf%rank)
end if
end subroutine end_timer