tem_timer_module Module

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.


Uses

  • module~~tem_timer_module~~UsesGraph module~tem_timer_module tem_timer_module module~flu_binding flu_binding module~tem_timer_module->module~flu_binding module~tem_aux_module tem_aux_module module~tem_timer_module->module~tem_aux_module module~tem_logging_module tem_logging_module module~tem_timer_module->module~tem_logging_module module~tem_grow_array_module tem_grow_array_module module~tem_timer_module->module~tem_grow_array_module module~tem_dyn_array_module tem_dyn_array_module module~tem_timer_module->module~tem_dyn_array_module module~env_module env_module module~tem_timer_module->module~env_module module~aot_table_ops_module aot_table_ops_module module~tem_timer_module->module~aot_table_ops_module module~aotus_module aotus_module module~tem_timer_module->module~aotus_module module~tem_tools_module tem_tools_module module~tem_timer_module->module~tem_tools_module mpi mpi module~tem_timer_module->mpi module~tem_aux_module->module~flu_binding module~tem_aux_module->module~tem_logging_module module~tem_aux_module->module~env_module module~tem_aux_module->module~aotus_module module~tem_aux_module->module~tem_tools_module module~tem_aux_module->mpi module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_module module~tem_comm_env_module tem_comm_env_module module~tem_aux_module->module~tem_comm_env_module module~soi_revision_module soi_revision_module module~tem_aux_module->module~soi_revision_module module~aot_table_module aot_table_module module~tem_aux_module->module~aot_table_module module~tem_logging_module->module~env_module module~tem_logging_module->module~aotus_module module~tem_logging_module->module~aot_table_module module~tem_grow_array_module->module~env_module module~tem_dyn_array_module->module~env_module module~env_module->module~flu_binding module~env_module->module~aotus_module module~env_module->mpi iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env module~tem_tools_module->module~env_module module~tem_lua_requires_module->module~flu_binding module~tem_lua_requires_module->module~env_module module~tem_lua_requires_module->module~aotus_module module~tem_lua_requires_module->module~aot_table_module iso_c_binding iso_c_binding module~tem_lua_requires_module->iso_c_binding module~tem_comm_env_module->mpi

Used by

  • module~~tem_timer_module~~UsedByGraph module~tem_timer_module tem_timer_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_timer_module module~tem_simcontrol_module tem_simControl_module module~tem_general_module->module~tem_simcontrol_module module~tem_simcontrol_module->module~tem_timer_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_simcontrol_module

Contents


Variables

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

Derived Types

type, public ::  tem_timer_type

Components

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

type, public ::  tem_timerconfig_type

Configuration of the output for the timers.

Components

Type Visibility Attributes Name Initial
character(len=PathLen), public :: filename = ''

Name of the file to write the timings into.

Read more…
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:

Read more…

type, public ::  tem_labeledtimer_type

Components

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).


Functions

public pure function tem_getTimerName(me, timerHandle) result(timerName)

Write out the timer name and its value

Arguments

Type IntentOptional Attributes Name
type(tem_labeledtimer_type), intent(in), optional :: me

timer object

integer, intent(in) :: timerHandle

timer handle

Return Value character(len=labelLen)

name of the timer

public function tem_getTimerVal(me, timerHandle) result(retValue)

Write out the timer name and its value

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

timer handle

Return Value real(kind=rk)

timer value

public function tem_getMaxTimerVal(me, timerHandle, comm) result(retValue)

Get the maximum timer duration across all partitions.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

timer handle

integer, intent(in) :: comm

communicator handle

Return Value real(kind=rk)

timer value

public function tem_getMinTimerVal(me, timerHandle, comm) result(retValue)

Get the minimum timer duration across all partitions.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

timer handle

integer, intent(in) :: comm

communicator handle

Return Value real(kind=rk)

timer value

public function tem_getSumTimerVal(me, timerHandle, comm) result(retValue)

Get the sum of timer durations across all partitions.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

timer handle

integer, intent(in) :: comm

communicator handle

Return Value real(kind=rk)

timer value

public function tem_getAveTimerVal(me, timerHandle, comm, nProcs) result(retValue)

Get the average of timer durations across all partitions.

Read more…

Arguments

Type IntentOptional 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.

Return Value real(kind=rk)

timer value

public pure function tem_getNTimers(me) result(n)

Get the number of timers.

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(in), optional :: me

timer object

Return Value integer

number of timer handles

public function tem_get_timerConfig() result(timerConfig)

This routine gets timer config required for apesmate

Arguments

None

Return Value type(tem_timerconfig_type)


Subroutines

public subroutine tem_appendTimers(me, nVals)

Append nVals new timers to the timer collection provided in 'me'.

Arguments

Type IntentOptional 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.

public subroutine tem_addTimer(me, timerName, timerHandle)

Setup a new timer object, reset the values and give it a label for later identification

Arguments

Type IntentOptional 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

public subroutine tem_startTimer(me, timerHandle)

Start the timer for the given timer handle

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

Handle of the timer to start

public subroutine tem_resetTimer(me, timerHandle)

Reset the timer to zero for the given timer handle

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

Handle of the timer to start

public subroutine tem_stopTimer(me, timerHandle)

Stop the timer for the given timer handle and update the timings

Arguments

Type IntentOptional Attributes Name
type(tem_timer_type), intent(inout), optional :: me

timer object

integer, intent(in) :: timerHandle

Handle of the timer to stop

public subroutine tem_timer_loadconfig(timer_config, conf, parent)

Load the configuration for the timer output.

Read more…

Arguments

Type IntentOptional 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.

public subroutine tem_timer_loadconfig_glob(conf, parent)

Load the configuration for the global (module) timer.

Arguments

Type IntentOptional 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.

public subroutine tem_timer_dumplabeled(me, comm, myrank, nProcs)

Arguments

Type IntentOptional 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.

public subroutine tem_timer_dump_glob(comm, myrank, nProcs)

Arguments

Type IntentOptional 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.

public subroutine tem_set_timerConfig(timerConfig)

This routine sets timer config required for apesmate

Arguments

Type IntentOptional Attributes Name
type(tem_timerconfig_type), intent(in) :: timerConfig