Skip to content

Match StructuredColumns::checksum with BlockStructuredColumns#384

Merged
wdeconinck merged 1 commit into
developfrom
feature/structuredcolumns_checksum
Jun 13, 2026
Merged

Match StructuredColumns::checksum with BlockStructuredColumns#384
wdeconinck merged 1 commit into
developfrom
feature/structuredcolumns_checksum

Conversation

@wdeconinck

@wdeconinck wdeconinck commented Jun 10, 2026

Copy link
Copy Markdown
Member

This pull request refactors and modernizes the checksum calculation logic for StructuredColumns in Atlas, removing the old parallel::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:

  • Removes the parallel::Checksum class and its associated caching infrastructure from StructuredColumns.
  • Introduces a new, internal checksum calculation mechanism that operates directly on fields and fieldsets.
  • Updates the test suite to match the new checksum outputs and refactors test helpers for clarity.

Key changes:

Checksum calculation refactor

  • Replaces the old parallel::Checksum-based checksum infrastructure in StructuredColumns with a new, internal implementation that computes checksums directly from data. This includes new helper structures and functions such as ChecksumData, update_lane_checksums_with_field_dynamic, and field_checksum. The new approach supports various data types and improves handling of field memory layout. (src/atlas/functionspace/detail/StructuredColumns.cc src/atlas/functionspace/detail/StructuredColumns.ccR74-R208)

  • Removes the StructuredColumnsChecksumCache class 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 from StructuredColumns that returned a parallel::Checksum reference, as it is no longer needed. (src/atlas/functionspace/detail/StructuredColumns.cc [1] src/atlas/functionspace/detail/StructuredColumns.h [2]

API and dependency cleanup

  • Removes all includes and references to parallel/Checksum.h and eckit/utils/MD5.h, as well as the parallel::Checksum forward 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.cc src/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

@wdeconinck wdeconinck force-pushed the feature/structuredcolumns_checksum branch from 3c7b174 to 1401248 Compare June 13, 2026 22:50
@wdeconinck wdeconinck force-pushed the feature/structuredcolumns_checksum branch from 1401248 to 2f72380 Compare June 13, 2026 23:25
@wdeconinck wdeconinck merged commit 9654daf into develop Jun 13, 2026
154 checks passed
@wdeconinck wdeconinck deleted the feature/structuredcolumns_checksum branch June 13, 2026 23:26
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.

1 participant