Skip to content

Commit

Permalink
Merge pull request #27 from marshallward/cpu_clock_sync_bugfix
Browse files Browse the repository at this point in the history
Bugfix: cpu clock sync error
  • Loading branch information
Hallberg-NOAA authored Dec 13, 2021
2 parents 86b91dc + e452a29 commit 7ae28b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions config_src/infra/FMS1/MOM_cpu_clock_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ integer function cpu_clock_id(name, sync, grain)
integer :: clock_flags

clock_flags = clock_flag_default
if (present(sync)) &
clock_flags = ibset(clock_flags, 0)
if (present(sync)) then
if (sync) then
clock_flags = ibset(clock_flags, 0)
else
clock_flags = ibclr(clock_flags, 0)
endif
endif

cpu_clock_id = mpp_clock_id(name, flags=clock_flags, grain=grain)
end function cpu_clock_id
Expand Down
9 changes: 7 additions & 2 deletions config_src/infra/FMS2/MOM_cpu_clock_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ integer function cpu_clock_id(name, sync, grain)
integer :: clock_flags

clock_flags = clock_flag_default
if (present(sync)) &
clock_flags = ibset(clock_flags, 0)
if (present(sync)) then
if (sync) then
clock_flags = ibset(clock_flags, 0)
else
clock_flags = ibclr(clock_flags, 0)
endif
endif

cpu_clock_id = mpp_clock_id(name, flags=clock_flags, grain=grain)
end function cpu_clock_id
Expand Down

0 comments on commit 7ae28b8

Please sign in to comment.