Timer infrastructure methods for the TreElM module
This module provides a convenience timing functionality for coarse grain measurements by encapsulating mpi_wtime and providing a set of timers to track.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | tem_timer_ignored | = | 0 | |
integer, | private, | parameter | :: | tem_timer_summary | = | 1 | |
integer, | private, | parameter | :: | tem_timer_details | = | 2 | |
type(tem_labeledtimer_type), | private, | save | :: | timer |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | nTimers | = | 0 |
Number of timers in this collection |
|
type(grw_realarray_type), | public | :: | tStart |
Start timing values |
|||
type(grw_logicalarray_type), | public | :: | running |
timer running? |
|||
type(grw_realarray_type), | public | :: | duration |
timing value |
Configuration of the output for the timers.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=PathLen), | public | :: | filename | = | '' |
Name of the file to write the timings into. |
|
type(dyn_labelarray_type), | public | :: | label |
Label of the timer to apply the verbosity setting to. |
|||
type(grw_intarray_type), | public | :: | verbosity |
Defines to which detail the corresponding timer with this label should be printed: |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(tem_timer_type), | public | :: | timedat |
Actual timer data |
|||
type(tem_timerconfig_type), | public | :: | config |
Output configuration |
|||
type(dyn_labelarray_type), | public | :: | label |
Label to use for each timer (unique). |
Write out the timer name and its value
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_labeledtimer_type), | intent(in), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
timer handle |
name of the timer
Write out the timer name and its value
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
timer handle |
timer value
Get the maximum timer duration across all partitions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
timer handle |
||
integer, | intent(in) | :: | comm |
communicator handle |
timer value
Get the minimum timer duration across all partitions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
timer handle |
||
integer, | intent(in) | :: | comm |
communicator handle |
timer value
Get the sum of timer durations across all partitions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
timer handle |
||
integer, | intent(in) | :: | comm |
communicator handle |
timer value
Get the average of timer durations across all partitions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
timer handle |
||
integer, | intent(in) | :: | comm |
communicator handle |
||
integer, | intent(in) | :: | nProcs |
Number of processes in the communicator. |
timer value
Get the number of timers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(in), | optional | :: | me |
timer object |
number of timer handles
This routine gets timer config required for apesmate
Append nVals new timers to the timer collection provided in 'me'.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout) | :: | me |
Timer object to extend by nVals timers |
||
integer, | intent(in) | :: | nVals |
Number of timers to append to me. |
Setup a new timer object, reset the values and give it a label for later identification
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_labeledtimer_type), | intent(inout), | optional | :: | me |
timer object |
|
character(len=*), | intent(in) | :: | timerName |
Name for this timer |
||
integer, | intent(out) | :: | timerHandle |
A handle to reference this timer |
Start the timer for the given timer handle
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
Handle of the timer to start |
Reset the timer to zero for the given timer handle
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
Handle of the timer to start |
Stop the timer for the given timer handle and update the timings
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timer_type), | intent(inout), | optional | :: | me |
timer object |
|
integer, | intent(in) | :: | timerHandle |
Handle of the timer to stop |
Load the configuration for the timer output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timerconfig_type), | intent(out) | :: | timer_config |
Timer configuration to load from the Lua configuration script. |
||
type(flu_State) | :: | conf |
Handle to the Lua configuration script. |
|||
integer, | intent(in), | optional | :: | parent |
Handle of the table containing the requested table. |
Load the configuration for the global (module) timer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | conf |
Timer configuration to load from the Lua configuration script. Handle to the Lua configuration script. |
|||
integer, | intent(in), | optional | :: | parent |
Handle of the table containing the requested table. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_labeledtimer_type), | intent(inout) | :: | me |
timer object |
||
integer, | intent(in) | :: | comm |
communicator handle |
||
integer, | intent(in) | :: | myrank |
MPI rank of the calling process. |
||
integer, | intent(in) | :: | nProcs |
Number of processes in the communicator. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | comm |
communicator handle |
||
integer, | intent(in) | :: | myrank |
MPI rank of the calling process. |
||
integer, | intent(in) | :: | nProcs |
Number of processes in the communicator. |
This routine sets timer config required for apesmate
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_timerconfig_type), | intent(in) | :: | timerConfig |