Skip to content

Allow for differences in sign of zeros when checking OM3 restart repro#188

Merged
dougiesquire merged 2 commits intomainfrom
om3-pm-zeros
Oct 20, 2025
Merged

Allow for differences in sign of zeros when checking OM3 restart repro#188
dougiesquire merged 2 commits intomainfrom
om3-pm-zeros

Conversation

@dougiesquire
Copy link
Copy Markdown
Collaborator

This PR allows for differences in sign of zeros when checking OM3 restart repro. Specifically, checksums are allowed to differ by 8 in the first hex digit. See the following issues for motivation and context:

Tests are added for the check_checksums_over_restarts method.

Closes #155

@dougiesquire dougiesquire self-assigned this Oct 19, 2025
@dougiesquire
Copy link
Copy Markdown
Collaborator Author

Tests pass locally. Test failure is not related to something I have modified:

 ImportError while importing test module '/home/runner/work/model-config-tests/model-config-tests/tests/config_tests/qa/test_test_access_esm1p5_config.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/config_tests/qa/test_test_access_esm1p5_config.py:4: in <module>
    from tests.common import RESOURCES_DIR
E   ModuleNotFoundError: No module named 'tests.common'

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 19, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.39%. Comparing base (62cedf8) to head (b881d91).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
src/model_config_tests/models/accessom3.py 85.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #188       +/-   ##
===========================================
- Coverage   81.49%   68.39%   -13.10%     
===========================================
  Files          20       14        -6     
  Lines        1194      829      -365     
===========================================
- Hits          973      567      -406     
- Misses        221      262       +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@minghangli-uni minghangli-uni left a comment

Choose a reason for hiding this comment

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

model-config-tests -m repro_restart
Test session starts (platform: linux, Python 3.11.0, pytest 8.3.4, pytest-sugar 1.0.0)
rootdir: /g/data/tm70/ml0072/COMMON/git_repos/model-config-tests
configfile: pyproject.toml
plugins: anyio-4.9.0, sugar-1.0.0, cov-6.0.0, hypothesis-6.57.1
collected 58 items / 57 deselected / 1 selected                                                                                                                                                      

 src/model_config_tests/config_tests/test_bit_reproducibility.py ✓                                                                                                                     100% ██████████

Results (478.10s (0:07:58)):
       1 passed
      57 deselected

LGTM. Thanks @dougiesquire

@dougiesquire dougiesquire merged commit 5b34e0c into main Oct 20, 2025
7 of 8 checks passed
@dougiesquire dougiesquire deleted the om3-pm-zeros branch October 20, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACCESS-OM3: checksums in MOM6 restart file are unreliable

2 participants