dbcsr_timings Module

Timing routines for accounting



Contents


Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: moduleN = 'dbcsr_timings'
type(list_timerenv_type), private, SAVE :: timers_stack
integer, public, parameter :: default_timings_level = 1
integer, public, SAVE :: global_timings_level = default_timings_level

Functions

public function get_timer_env() result(timer_env)

returns the current timer env from the stack

Arguments

None

Return Value type(timer_env_type), POINTER

private function routine_name2id(routineN) result(routine_id)

Internal routine used by timeset_handler and timings_setup_tracing. If no routine with given name is found in timer_env%routine_names then a new entry is created.

Arguments

Type IntentOptional Attributes Name
character(len=default_string_length), intent(in) :: routineN

Return Value integer


Subroutines

public subroutine timings_register_hooks()

Registers handlers with base_hooks.F

Arguments

None

public subroutine add_timer_env(timer_env)

adds the given timer_env to the top of the stack

Read more…

Arguments

Type IntentOptional Attributes Name
type(timer_env_type), optional, POINTER :: timer_env

private subroutine timer_env_create(timer_env)

creates a new timer env

Arguments

Type IntentOptional Attributes Name
type(timer_env_type), POINTER :: timer_env

public subroutine rm_timer_env()

removes the current timer env from the stack

Read more…

Arguments

None

public subroutine timer_env_retain(timer_env)

retains the given timer env

Arguments

Type IntentOptional Attributes Name
type(timer_env_type), POINTER :: timer_env

the timer env to retain

public subroutine timer_env_release(timer_env)

releases the given timer env

Arguments

Type IntentOptional Attributes Name
type(timer_env_type), POINTER :: timer_env

the timer env to release

public subroutine timeset_handler(routineN, handle)

Start timer

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: routineN
integer, intent(out) :: handle

public subroutine timestop_handler(handle)

End timer

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: handle

public subroutine timings_setup_tracing(trace_max, unit_nr, trace_str, routine_names)

Set routine tracer

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: trace_max

maximum number of calls reported per routine. Setting this to zero disables tracing. output unit used for printing the trace-messages

integer, intent(in) :: unit_nr

maximum number of calls reported per routine. Setting this to zero disables tracing. output unit used for printing the trace-messages

character(len=13), intent(in) :: trace_str

short info-string which is printed along with every message

character(len=default_string_length), intent(in), optional, DIMENSION(:) :: routine_names

List of routine-names. If provided only these routines will be traced. If not present all routines will traced.

public subroutine print_stack(unit_nr)

Print current routine stack

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit_nr