Match StructuredColumns::checksum with BlockStructuredColumns#384
Merged
Conversation
3c7b174 to
1401248
Compare
…ckStructuredColumns::checksum
1401248 to
2f72380
Compare
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 pull request refactors and modernizes the checksum calculation logic for
StructuredColumnsin Atlas, removing the oldparallel::Checksum-based implementation and replacing it with a new, more flexible, and efficient approach. The changes also update tests and clean up related code and dependencies.Major highlights:
parallel::Checksumclass and its associated caching infrastructure fromStructuredColumns.Key changes:
Checksum calculation refactor
Replaces the old
parallel::Checksum-based checksum infrastructure inStructuredColumnswith a new, internal implementation that computes checksums directly from data. This includes new helper structures and functions such asChecksumData,update_lane_checksums_with_field_dynamic, andfield_checksum. The new approach supports various data types and improves handling of field memory layout. (src/atlas/functionspace/detail/StructuredColumns.ccsrc/atlas/functionspace/detail/StructuredColumns.ccR74-R208)Removes the
StructuredColumnsChecksumCacheclass and all related code, simplifying the class structure and eliminating the need for a checksum cache. (src/atlas/functionspace/detail/StructuredColumns.cc[1]src/atlas/functionspace/detail/StructuredColumns.h[2] [3]Deletes the
checksum()member function fromStructuredColumnsthat returned aparallel::Checksumreference, as it is no longer needed. (src/atlas/functionspace/detail/StructuredColumns.cc[1]src/atlas/functionspace/detail/StructuredColumns.h[2]API and dependency cleanup
parallel/Checksum.handeckit/utils/MD5.h, as well as theparallel::Checksumforward declaration. (src/atlas/functionspace/detail/StructuredColumns.cc[1] [2];src/atlas/functionspace/detail/StructuredColumns.h[3]Test updates
Updates checksum expectations in tests to match the new checksum logic and output format (now a short hex string instead of an MD5 hash). Refactors the helpers and test cases to distinguish between node-based and block-based checksums. (
src/tests/functionspace/test_functionspace_splitcomm.cc[1] [2] [3] [4]Adds a utility function to fill structured fields with sequential values for more robust and flexible test setup. (
src/tests/functionspace/test_structuredcolumns.ccsrc/tests/functionspace/test_structuredcolumns.ccR39-R74)These changes collectively modernize the checksum infrastructure, improve code maintainability, and ensure that tests accurately reflect the new logic.
💣💥☠️ Static Analyzer Report ☠️💥💣
https://sites.ecmwf.int/docs/atlas/static-analyzer/PR-384