Consolidate reproducible sum with unit tests#902
Merged
Hallberg-NOAA merged 1 commit intoMay 21, 2025
Merged
Conversation
Member
|
I have examined the F90 code changes, and they do look correct to me. I would note that there is a fair amount of code duplication between test_reproducing_sum.F90 and time_reproducing_sum.F90. We generally allow for two (small) duplicated copies of a block of code (as is the case here), but if we were going to use this 3 or more times, we would want to refactor this to avoid the duplication! If someone else could vouch for the .yml and .py code changes, I will be happy to approve this after PR #899 is resolved. |
386b2a3 to
ef0eed2
Compare
ef0eed2 to
c4b78bd
Compare
c4b78bd to
221f93f
Compare
Hallberg-NOAA
approved these changes
May 20, 2025
Member
Hallberg-NOAA
left a comment
There was a problem hiding this comment.
I agree that these changes are correctly implementing an improved unit testing capability.
221f93f to
5403def
Compare
This simplifies and expands the timing/testing of reproducing sums that were in .../unit_drivers and would not work without some setup of the environment (input files). The refactored drivers are stand alone and (mostly) fit within the pattern of the other unit tests and timing tests. - Moves config_src/drivers/unit_drivers/MOM_sum_driver.F90 to config_src/drivers/timing/time_reproducing_sum.F90 - Cleaned up time_reproducing_sum to not use unnecessary infrastructure (like grids, parameter files, etc.) - Added config_src/drivers/unit_tests/test_reproducing_sum.F90 to perform property tests removed from timing test. - Added trivial unit test that reproducing_sum() gives correct analytic sum for array of precsribed values - Added new tests that reproducing_sum() results are invariant to order of values in arrays - Made MOM_define_layout() public - Initialized MOM_dom%nonblocking_updates and MOM_dom%thin_halo_updates when optional arguments are missing (bug fix) - Hacked .testing/tools/disp_timing.py to not fail on the FMS tail sheet which inevitably is generated when using FMS :(
5403def to
6511cc8
Compare
Member
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/27517. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This simplifies and expands the timing/testing of reproducing sums that were in .../unit_drivers and would not work without some
setup of the environment (input files). The refactored drivers are stand alone and (mostly) fit within the pattern of the other unit tests and timing tests.
Note: this contains two commits from #899 that should be merged before this PR, so I'm marking it as draft until then at which time I'll rebase this down to the one commit.