pic_timer Module

contains a simple timer module to measure and record time


Uses

  • module~~pic_timer~~UsesGraph module~pic_timer pic_timer module~pic_string_utils pic_string_utils module~pic_timer->module~pic_string_utils module~pic_types pic_types module~pic_timer->module~pic_types module~pic_string_utils->module~pic_types iso_fortran_env iso_fortran_env module~pic_types->iso_fortran_env

Used by

  • module~~pic_timer~~UsedByGraph module~pic_timer pic_timer module~pic_flop_rate pic_flop_rate module~pic_flop_rate->module~pic_timer

Derived Types

type, public ::  pic_timer_type

derived type for a timer, contains the start, stop, and count variables can work with or without omp. If PIC is compiled with OpenMP the default timer will be the omp time. This is mostly to minimize problems with threading and system clock

Components

Type Visibility Attributes Name Initial
integer(kind=default_int), private :: count_rate = 1_default_int
logical, private :: is_running = .false.
integer(kind=default_int), private :: start_count = 0_default_int
real(kind=dp), private :: start_time = 0.0_dp
integer(kind=default_int), private :: stop_count = 0_default_int
real(kind=dp), private :: stop_time = 0.0_dp
real(kind=dp), private :: walltime

Type-Bound Procedures

procedure, public :: get_elapsed_time => timer_get_elapsed_time
procedure, public :: print_time => timer_print_time
procedure, public :: start => timer_start
procedure, public :: stop => timer_stop

Functions

private function timer_get_elapsed_time(self) result(elapsed)

Returns the elapsed time as a real(dp) variable

Read more…

Arguments

Type IntentOptional Attributes Name
class(pic_timer_type), intent(in) :: self

Return Value real(kind=dp)


Subroutines

private subroutine timer_print_time(self)

Prints the elapsed time at the time of calling

Read more…

Arguments

Type IntentOptional Attributes Name
class(pic_timer_type), intent(in) :: self

private subroutine timer_start(self)

starts the timer. If OMP is enabled, it will use omp_get_wtime() if not, it will use Fortran’s system_clock

Read more…

Arguments

Type IntentOptional Attributes Name
class(pic_timer_type), intent(inout) :: self

private subroutine timer_stop(self)

stop the timer. If OMP is enabled, it will use omp_get_wtime() if not, it will use Fortran’s system_clock

Read more…

Arguments

Type IntentOptional Attributes Name
class(pic_timer_type), intent(inout) :: self