timer Derived Type

type, public :: timer


Components

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

Type-Bound Procedures

procedure, public :: ctimer_start

  • private impure subroutine ctimer_start(this)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Starts the timer by recording the current CPU time value. This value is used to calculate the CPU time later.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this

procedure, public :: ctimer_stop

  • private impure subroutine ctimer_stop(this, nloops, message, print, color)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Stops the timer and calculates the CPU time. Optionally, it can print a message along with the CPU time.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this
    integer, intent(in), optional :: nloops
    character(len=*), intent(in), optional :: message
    logical, intent(in), optional :: print
    character(len=*), intent(in), optional :: color

procedure, public :: ctimer_write

  • private impure subroutine ctimer_write(this, file_name)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Writes the CPU time to a file.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(in) :: this
    character(len=*), intent(in) :: file_name

procedure, public :: dtimer_start

  • private impure subroutine dtimer_start(this)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Starts the timer by recording the current processor clock value. This value is used to calculate the elapsed time later.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this

procedure, public :: dtimer_stop

  • private impure subroutine dtimer_stop(this, nloops, message, print, color)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Stops the timer and calculates the elapsed time. Optionally, it can print a message along with the elapsed time.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this
    integer, intent(in), optional :: nloops
    character(len=*), intent(in), optional :: message
    logical, intent(in), optional :: print
    character(len=*), intent(in), optional :: color

procedure, public :: dtimer_write

  • private impure subroutine dtimer_write(this, file_name)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Writes the elapsed time to a file.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(in) :: this
    character(len=*), intent(in) :: file_name

procedure, public :: mtimer_start

  • private impure subroutine mtimer_start(this)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Starts the timer by recording the current MPI time value. This value is used to calculate the MPI time later.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this

procedure, public :: mtimer_stop

  • private impure subroutine mtimer_stop(this, nloops, message, print, color)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Stops the timer and calculates the MPI time. Optionally, it can print a message along with the MPI time.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this
    integer, intent(in), optional :: nloops
    character(len=*), intent(in), optional :: message
    logical, intent(in), optional :: print
    character(len=*), intent(in), optional :: color

procedure, public :: mtimer_write

  • private impure subroutine mtimer_write(this, file_name)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Writes the MPI time to a file.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(in) :: this
    character(len=*), intent(in) :: file_name

procedure, public :: otimer_start

  • private impure subroutine otimer_start(this)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Starts the timer by recording the current OMP time value. This value is used to calculate the OMP time later.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this

procedure, public :: otimer_stop

  • private impure subroutine otimer_stop(this, nloops, message, print, color)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Stops the timer and calculates the OMP time. Optionally, it can print a message along with the OMP time.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this
    integer, intent(in), optional :: nloops
    character(len=*), intent(in), optional :: message
    logical, intent(in), optional :: print
    character(len=*), intent(in), optional :: color

procedure, public :: otimer_write

  • private impure subroutine otimer_write(this, file_name)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Writes the OMP time to a file.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(in) :: this
    character(len=*), intent(in) :: file_name

procedure, public :: timer_start

  • private impure subroutine timer_start(this)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Starts the timer by recording the current processor clock value. This value is used to calculate the elapsed time later.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this

procedure, public :: timer_stop

  • private impure subroutine timer_stop(this, nloops, message, print, color)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Stops the timer and calculates the elapsed time. Optionally, it can print a message along with the elapsed time.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(inout) :: this
    integer, intent(in), optional :: nloops
    character(len=*), intent(in), optional :: message
    logical, intent(in), optional :: print
    character(len=*), intent(in), optional :: color

procedure, public :: timer_write

  • private impure subroutine timer_write(this, file_name)

    Author
    Seyed Ali Ghasemi
    License
    BSD 3-Clause

    Writes the elapsed time to a file.

    Arguments

    Type IntentOptional Attributes Name
    class(timer), intent(in) :: this
    character(len=*), intent(in) :: file_name