MOM6
mom_cpu_clock Module Reference

Detailed Description

Wraps the MPP cpu clock functions.

Functions/Subroutines

integer function, public cpu_clock_id (name, synchro_flag, grain)
 cpu_clock_id returns the integer handle for a named CPU clock. More...
 

Function/Subroutine Documentation

◆ cpu_clock_id()

integer function, public mom_cpu_clock::cpu_clock_id ( character(len=*), intent(in)  name,
integer, intent(in), optional  synchro_flag,
integer, intent(in), optional  grain 
)

cpu_clock_id returns the integer handle for a named CPU clock.

Parameters
[in]nameThe unique name of the CPU clock
[in]synchro_flagAn integer flag that controls whether the PEs are synchronized before the cpu clocks start counting. Synchronization occurs before the start of a clock if this is odd, while additional (expensive) statistics can set for other values. If absent, the default is taken from the settings for FMS.
[in]grainThe timing granularity for this clock, usually set to the values of CLOCK_COMPONENT, CLOCK_ROUTINE, CLOCK_LOOP, etc.
Returns
The integer CPU clock handle.

Definition at line 22 of file MOM_cpu_clock.F90.

23  character(len=*), intent(in) :: name !< The unique name of the CPU clock
24  integer, intent(in), optional :: synchro_flag !< An integer flag that controls whether the PEs
25  !! are synchronized before the cpu clocks start counting.
26  !! Synchronization occurs before the start of a clock if this
27  !! is odd, while additional (expensive) statistics can set
28  !! for other values. If absent, the default is taken from the
29  !! settings for FMS.
30  integer, intent(in), optional :: grain !< The timing granularity for this clock, usually set to
31  !! the values of CLOCK_COMPONENT, CLOCK_ROUTINE, CLOCK_LOOP, etc.
32  integer :: cpu_clock_id !< The integer CPU clock handle.
33 
34  if (present(synchro_flag)) then
35  cpu_clock_id = mpp_clock_id(name, flags=synchro_flag, grain=grain)
36  else
37  cpu_clock_id = mpp_clock_id(name, flags=clock_flag_default, grain=grain)
38  endif
39