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~tem_dyn_array_module tem_dyn_array_module module~tem_timer_module->module~tem_dyn_array_module module~tem_aux_module tem_aux_module module~tem_timer_module->module~tem_aux_module module~aot_table_ops_module aot_table_ops_module module~tem_timer_module->module~aot_table_ops_module module~env_module env_module module~tem_timer_module->module~env_module module~tem_logging_module tem_logging_module module~tem_timer_module->module~tem_logging_module module~flu_binding flu_binding module~tem_timer_module->module~flu_binding module~tem_tools_module tem_tools_module module~tem_timer_module->module~tem_tools_module module~tem_grow_array_module tem_grow_array_module module~tem_timer_module->module~tem_grow_array_module module~aotus_module aotus_module module~tem_timer_module->module~aotus_module mpi mpi module~tem_timer_module->mpi module~tem_dyn_array_module->module~env_module module~tem_aux_module->module~env_module module~tem_aux_module->module~tem_logging_module module~tem_aux_module->module~flu_binding module~tem_aux_module->module~tem_tools_module module~tem_aux_module->module~aotus_module module~tem_aux_module->mpi module~tem_revision_module tem_revision_module module~tem_aux_module->module~tem_revision_module module~tem_comm_env_module tem_comm_env_module module~tem_aux_module->module~tem_comm_env_module module~aot_table_module aot_table_module module~tem_aux_module->module~aot_table_module module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_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_logging_module->module~env_module module~tem_logging_module->module~aotus_module module~tem_logging_module->module~aot_table_module module~tem_tools_module->module~env_module module~tem_grow_array_module->module~env_module module~tem_comm_env_module->mpi module~tem_lua_requires_module->module~env_module module~tem_lua_requires_module->module~flu_binding 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

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 program~bin_search_test bin_search_test program~bin_search_test->module~tem_timer_module program~bin_search_test->module~tem_general_module program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->module~tem_general_module module~tem_utestenv_module tem_utestEnv_module program~tem_varsys_stfunvar_test->module~tem_utestenv_module program~tem_varsys_statevar_test tem_varSys_stateVar_test program~tem_varsys_statevar_test->module~tem_general_module program~tem_varsys_statevar_test->module~tem_utestenv_module program~tem_sparta_test tem_sparta_test program~tem_sparta_test->module~tem_general_module program~tem_sparta_test->module~tem_utestenv_module program~tem_varsys_derivevar_test tem_varSys_deriveVar_test program~tem_varsys_derivevar_test->module~tem_general_module program~tem_varsys_derivevar_test->module~tem_utestenv_module program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->module~tem_general_module program~tem_variable_evaltype_test->module~tem_utestenv_module program~tem_varsys_test tem_varSys_test program~tem_varsys_test->module~tem_general_module program~tem_varsys_test->module~tem_utestenv_module program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->module~tem_general_module program~tem_spacetime_fun_test->module~tem_utestenv_module program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->module~tem_general_module program~tem_logical_opertor_test->module~tem_utestenv_module program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->module~tem_general_module program~tem_variable_extract_test->module~tem_utestenv_module program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->module~tem_general_module program~tem_variable_combine_test->module~tem_utestenv_module program~tem_face_test tem_face_test program~tem_face_test->module~tem_general_module program~tem_face_test->module~tem_utestenv_module program~tem_face_test~2 tem_face_test program~tem_face_test~2->module~tem_general_module program~tem_face_test~2->module~tem_utestenv_module module~tem_utestenv_module->module~tem_general_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_simcontrol_module program~tem_face_test~3 tem_face_test program~tem_face_test~3->module~tem_general_module program~tem_face_test~3->module~tem_utestenv_module program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->module~tem_general_module program~tem_varsys_opvar_test->module~tem_utestenv_module program~tem_tracking_test tem_tracking_test program~tem_tracking_test->module~tem_tracking_module

Contents


Variables

TypeVisibilityAttributesNameInitial
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

TypeVisibilityAttributesNameInitial
integer, private :: nTimers =0

Number of timers in this collection

type(grw_realarray_type), private :: tStart

Start timing values

type(grw_logicalarray_type), private :: running

timer running?

type(grw_realarray_type), private :: duration

timing value

type, public :: tem_timerconfig_type

Configuration of the output for the timers.

Components

TypeVisibilityAttributesNameInitial
character(len=PathLen), private :: filename =''

Name of the file to write the timings into.

Read more…
type(dyn_labelarray_type), private :: label

Label of the timer to apply the verbosity setting to.

type(grw_intarray_type), private :: verbosity

Defines to which detail the corresponding timer with this label should be printed:

Read more…

type, public :: tem_labeledtimer_type

Components

TypeVisibilityAttributesNameInitial
type(tem_timer_type), private :: timedat

Actual timer data

type(tem_timerconfig_type), private :: config

Output configuration

type(dyn_labelarray_type), private :: 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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
type(tem_timerconfig_type), intent(in) :: timerConfig