Provides a lightweight @p timer_t derived type built on so that the timers remain meaningful for future MPI-parallel runs where per-process wall time is the quantity of interest.
Typical use: @code type(timer_t) :: t call timer_start(t) call expensive_work() call timer_stop(t) call timer_report(t, 'expensive_work') @endcode
Wall-clock timer accumulator.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int64), | public | :: | count_start | = | 0_int64 |
p: system_clock count recorded at the most recent @p timer_start call. |
|
| integer(kind=int64), | public | :: | count_total | = | 0_int64 |
Accumulated elapsed @p system_clock counts across all start/stop pairs. |
|
| integer, | public | :: | n_calls | = | 0 |
Number of completed start/stop pairs. |
|
| logical, | public | :: | running | = | .false. |
p: .true. between a @p timer_start and the corresponding @p timer_stop. |
Return accumulated wall time in seconds.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(timer_t), | intent(in) | :: | t |
Timer to query. |
Return elapsed wall time in seconds, including the current running segment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(timer_t), | intent(in) | :: | t |
Timer to query. |
Start (or resume) the timer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(timer_t), | intent(inout) | :: | t |
Timer to start. |
Stop the timer and accumulate elapsed counts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(timer_t), | intent(inout) | :: | t |
Timer to stop. |
Reset a timer to the zero state.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(timer_t), | intent(inout) | :: | t |
Timer to reset. |
Print a one-line performance report to stdout.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(timer_t), | intent(in) | :: | t |
Timer to report. |
||
| character(len=*), | intent(in) | :: | label |
Descriptive region name. |