pic_flop_rate Module

pic_flop_rate is a convenient encapsulation of the flop_recorder and pic_timer it is used to measure the flop rate of a given operation, and report it


Uses

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

Derived Types

type, public ::  flop_rate_type

derived type for flop rate, contains a timer and a flop recorder

Components

Type Visibility Attributes Name Initial
real(kind=dp), private :: m_flop_rate

private by default so that people use the accessor functions

type(flop_recorder_type), private :: m_flops
type(pic_timer_type), private :: m_timer

Type-Bound Procedures

procedure, public :: add_flops => flop_rate_add_flops
procedure, public :: get_flop_rate => flop_rate_get_flop_rate
procedure, public :: get_flops => flop_rate_get_flops
procedure, public :: get_time => flop_rate_get_time
procedure, public :: report => flop_rate_report
procedure, public :: reset => flop_rate_reset
procedure, public :: start_time => flop_rate_start_time
procedure, public :: stop_time => flop_rate_stop_time

Functions

private function flop_rate_get_flop_rate(self) result(flop_rate)

get the flop rate in GFLOP/s, this will calculate the flop rate based on the number of flops and the elapsed time

Read more…

Arguments

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

Return Value real(kind=dp)

private function flop_rate_get_flops(self) result(flops)

get the number of flops recorded in the flop rate type

Read more…

Arguments

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

Return Value integer(kind=int64)

private function flop_rate_get_time(self) result(time)

get the elapsed time in seconds from the timer contained in the flop rate type

Read more…

Arguments

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

Return Value real(kind=dp)


Subroutines

private subroutine flop_rate_add_flops(self, flops)

add flops to the flop rate type, this will add the flops to the flop recorder Usage: call my_flop_rate%add_flops(1000)

Read more…

Arguments

Type IntentOptional Attributes Name
class(flop_rate_type), intent(inout) :: self
integer(kind=int64), intent(in) :: flops

private subroutine flop_rate_report(self)

report the flop rate, this will print the flop rate in GFLOP/s

Read more…

Arguments

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

private subroutine flop_rate_reset(self)

reset the flop rate type, this will reset the timer and the flop recorder

Read more…

Arguments

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

private subroutine flop_rate_start_time(self)

Calls the start method for the timer contained in the flop rate type

Read more…

Arguments

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

private subroutine flop_rate_stop_time(self)

Calls the stop method for the timer contained in the flop rate type

Read more…

Arguments

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