Skip to content

Commit

Permalink
Merge pull request #768 from GEOS-ESM/feature/mathomp4/#511-system-cl…
Browse files Browse the repository at this point in the history
…ock-int64

Fixes #511. Use INT64 for SYSTEM_CLOCK
  • Loading branch information
mathomp4 authored Mar 23, 2021
2 parents 0442c3c + 9890976 commit da7c697
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed error handling in profiler/BaseProfiler.F90
- Fix memory leak when using fast_oserver in write_restart_by_oserver
- Bumped cube version to 2.91 in global metadata

- Change calls to `system_clock()` to be `INT64` (#511)

### Removed

Expand Down
8 changes: 4 additions & 4 deletions base/MAPL_Profiler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module MAPL_ProfMod
#ifdef _CUDA
use cudafor
#endif
use, intrinsic :: ISO_FORTRAN_ENV, only: REAL64
use, intrinsic :: ISO_FORTRAN_ENV, only: REAL64, INT64
implicit none
private

Expand All @@ -30,7 +30,7 @@ module MAPL_ProfMod
type, public :: MAPL_Prof
private
character(len=ESMF_MAXSTR) :: NAME=""
integer :: START_TIME
integer(kind=INT64) :: START_TIME
real (kind=REAL64) :: CUMM_TIME
end type MAPL_Prof

Expand All @@ -53,7 +53,7 @@ module MAPL_ProfMod
integer, public, parameter :: MAPL_TimerModeMinMax = 3

type(ESMF_VM), save :: VM
integer, save :: COUNT_MAX, COUNT_RATE
integer(kind=INT64), save :: COUNT_MAX, COUNT_RATE
real(kind=REAL64), save :: CRI
logical, save :: FIRSTTIME = .true.
logical, save :: DISABLED = .false.
Expand Down Expand Up @@ -119,7 +119,7 @@ subroutine MAPL_ProfClockOff(TIMES, NAME, RC)

character(len=ESMF_MAXSTR), parameter :: IAm="MAPL_ProfClockOff"

integer :: COUNTS
integer(kind=INT64) :: COUNTS
integer :: I, NN
integer :: status

Expand Down
4 changes: 2 additions & 2 deletions gridcomps/Cap/MAPL_Cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module MAPL_CapMod
use MAPL_CapOptionsMod
use MAPL_ServerManager
use MAPL_ApplicationSupport
use, intrinsic :: iso_fortran_env, only: REAL64, INT64, OUTPUT_UNIT
implicit none
private

Expand Down Expand Up @@ -226,7 +227,7 @@ subroutine run_model(this, comm, unusable, rc)
integer, optional, intent(out) ::rc

type (ESMF_VM) :: vm
integer :: start_tick, stop_tick, tick_rate
integer(kind=INT64) :: start_tick, stop_tick, tick_rate
integer :: status
class(Logger), pointer :: lgr

Expand Down Expand Up @@ -267,7 +268,6 @@ subroutine stop_timer()
end subroutine stop_timer

subroutine report_throughput(rc)
use, intrinsic :: iso_fortran_env, only: REAL64, OUTPUT_UNIT
integer, optional, intent(out) :: rc

integer :: rank, ierror
Expand Down
2 changes: 1 addition & 1 deletion profiler/FortranTimerGauge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module MAPL_FortranTimerGauge

function new_FortranTimerGauge() result(gauge)
type (FortranTimerGauge) :: gauge
integer(kind=REAL64) :: count_rate
integer(kind=INT64) :: count_rate

call system_clock(count_rate=count_rate)
gauge%denominator = 1._REAL64/count_rate
Expand Down

0 comments on commit da7c697

Please sign in to comment.