This module provides a timer object for measuring elapsed time. It includes procedures for starting and stopping the timer, as well as calculating and printing the elapsed time in seconds.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public | :: | cpu_time | ||||
real(kind=rk), | public | :: | elapsed_dtime | ||||
real(kind=rk), | public | :: | elapsed_time | ||||
real(kind=rk), | public | :: | mpi_time | ||||
real(kind=rk), | public | :: | omp_time | ||||
integer, | private | :: | clock_elapsed | ||||
integer, | private | :: | clock_end | ||||
integer, | private | :: | clock_rate | ||||
integer, | private | :: | clock_start | ||||
real(kind=rk), | private | :: | cpu_elapsed | ||||
real(kind=rk), | private | :: | cpu_end | ||||
real(kind=rk), | private | :: | cpu_start | ||||
real(kind=rk), | private | :: | mpi_elapsed | ||||
real(kind=rk), | private | :: | mpi_end | ||||
real(kind=rk), | private | :: | mpi_start | ||||
real(kind=rk), | private | :: | omp_elapsed | ||||
real(kind=rk), | private | :: | omp_end | ||||
real(kind=rk), | private | :: | omp_start | ||||
integer, | private, | dimension(8) | :: | values_elapsed | |||
integer, | private, | dimension(8) | :: | values_end | |||
integer, | private, | dimension(8) | :: | values_start |
procedure, public :: ctimer_start | |
procedure, public :: ctimer_stop | |
procedure, public :: ctimer_write | |
procedure, public :: dtimer_start | |
procedure, public :: dtimer_stop | |
procedure, public :: dtimer_write | |
procedure, public :: mtimer_start | |
procedure, public :: mtimer_stop | |
procedure, public :: mtimer_write | |
procedure, public :: otimer_start | |
procedure, public :: otimer_stop | |
procedure, public :: otimer_write | |
procedure, public :: timer_start | |
procedure, public :: timer_stop | |
procedure, public :: timer_write |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(8) | :: | values |
Starts the timer by recording the current CPU time value. This value is used to calculate the CPU time later.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this |
Stops the timer and calculates the CPU time. Optionally, it can print a message along with the CPU time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this | |||
integer, | intent(in), | optional | :: | nloops | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(in), | optional | :: | |||
character(len=*), | intent(in), | optional | :: | color |
Writes the CPU time to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(in) | :: | this | |||
character(len=*), | intent(in) | :: | file_name |
Starts the timer by recording the current processor clock value. This value is used to calculate the elapsed time later.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this |
Stops the timer and calculates the elapsed time. Optionally, it can print a message along with the elapsed time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this | |||
integer, | intent(in), | optional | :: | nloops | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(in), | optional | :: | |||
character(len=*), | intent(in), | optional | :: | color |
Writes the elapsed time to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(in) | :: | this | |||
character(len=*), | intent(in) | :: | file_name |
Starts the timer by recording the current MPI time value. This value is used to calculate the MPI time later.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this |
Stops the timer and calculates the MPI time. Optionally, it can print a message along with the MPI time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this | |||
integer, | intent(in), | optional | :: | nloops | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(in), | optional | :: | |||
character(len=*), | intent(in), | optional | :: | color |
Writes the MPI time to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(in) | :: | this | |||
character(len=*), | intent(in) | :: | file_name |
Starts the timer by recording the current OMP time value. This value is used to calculate the OMP time later.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this |
Stops the timer and calculates the OMP time. Optionally, it can print a message along with the OMP time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this | |||
integer, | intent(in), | optional | :: | nloops | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(in), | optional | :: | |||
character(len=*), | intent(in), | optional | :: | color |
Writes the OMP time to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(in) | :: | this | |||
character(len=*), | intent(in) | :: | file_name |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | time | |||
character(len=*), | intent(in) | :: | message | |||
character(len=*), | intent(in), | optional | :: | color |
Starts the timer by recording the current processor clock value. This value is used to calculate the elapsed time later.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this |
Stops the timer and calculates the elapsed time. Optionally, it can print a message along with the elapsed time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(inout) | :: | this | |||
integer, | intent(in), | optional | :: | nloops | ||
character(len=*), | intent(in), | optional | :: | message | ||
logical, | intent(in), | optional | :: | |||
character(len=*), | intent(in), | optional | :: | color |
Writes the elapsed time to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timer), | intent(in) | :: | this | |||
character(len=*), | intent(in) | :: | file_name |