Skip to content

Bugfix: cpu clock sync error#27

Merged
Hallberg-NOAA merged 4 commits into
NOAA-GFDL:dev/gfdlfrom
marshallward:cpu_clock_sync_bugfix
Dec 13, 2021
Merged

Bugfix: cpu clock sync error#27
Hallberg-NOAA merged 4 commits into
NOAA-GFDL:dev/gfdlfrom
marshallward:cpu_clock_sync_bugfix

Conversation

@marshallward
Copy link
Copy Markdown
Member

This patch fixes an error in the sync flag of the cpu clocks.

Previously, we would set the sync bit of a flag based on the presence of
sync, rather than testing if the value was true. This would cause
potential hangs in any clock that set sync, including .false..

This patch correctly replaces the single ibset call with an if-block
to either ibset or ibclr.

This patch fixes an error in the `sync` flag of the cpu clocks.

Previously, we would set the sync bit of a flag based on the presence of
sync, rather than testing if the value was true.  This would cause
potential hangs in any clock that set `sync`, including `.false.`.

This patch correctly replaces the single `ibset` call with an if-block
to either `ibset` or `ibclr`.
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 4, 2021

Codecov Report

Merging #27 (e452a29) into dev/gfdl (86b91dc) will decrease coverage by 0.00%.
The diff coverage is 25.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl      #27      +/-   ##
============================================
- Coverage     29.00%   29.00%   -0.01%     
============================================
  Files           240      240              
  Lines         71235    71237       +2     
============================================
  Hits          20665    20665              
- Misses        50570    50572       +2     
Impacted Files Coverage Δ
config_src/infra/FMS1/MOM_cpu_clock_infra.F90 80.00% <25.00%> (-12.31%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86b91dc...e452a29. Read the comment docs.

Copy link
Copy Markdown
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that these changes do correct a bug in the implementation of the sync option to the two clock_id() routines. They have passed both TC testing and pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/14333.

@Hallberg-NOAA Hallberg-NOAA merged commit 7ae28b8 into NOAA-GFDL:dev/gfdl Dec 13, 2021
@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Feb 1, 2022
@marshallward marshallward deleted the cpu_clock_sync_bugfix branch September 16, 2022 20:56
theresa-cordero added a commit to theresa-cordero/MOM6 that referenced this pull request May 7, 2025
Co-authored-by: Theresa Morrison <Theresa.Morrison@gaea68.ncrc.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants