Draft
Conversation
TomMelt
added a commit
that referenced
this pull request
Mar 16, 2026
# Add corner neighbours into halo exchange logic ### Task List - [x] Linked an issue above that captures the requirements of this PR - [x] Defined the tests that specify a complete and functioning change - [x] Implemented the source code change that satisfies the tests - [x] Commented all code so that it can be understood without additional context - [x] No new warnings are generated or they are mentioned below - [x] The documentation has been updated (or an issue has been created to do so) - [x] Relevant labels (e.g., enhancement, bug) have been applied to this PR - [x] This change conforms to the conventions described in the README --- # Change Description This PR has the following key changes: - adds support for corner neighbours to the existing halo exchange logic (which previously just exchanged edges) - add support for `CGVector` and `DGVectorHolder` exchange (this is required for corners and edges) - updates metadata tests and closed-boundary (CB) halo test to work with corner neighbours - removes the Periodic-Boundary (PB) halo exchange test for now, this will be addressed in a subsequent PR #1044 --- # Test Description ### `HaloExchangePB_test.cpp` `HaloExchangeCB_test.cpp` creates test data for all the array types: - `HField` - `VertexField` - `DGField` - `DGVector` - `CGVector` I modified the previous version, so that the model data are created in such a way that the value of each cell can be calculated based on its indices. Therefore we can check after exchange that all of the cells have been exchanged successfully. This also now allows us to change the number of ranks arbitrarily (assuming you also provide the appropriate `partition_metadata` file. ### `ModelMetadataCB_test.cpp` and `ModelMetadataPB_test.cpp` Small modifications have been made to the periodic and closed boundary `ModelMetadata` tests. The changes now add the additional corner neighbour metadata and check that it is ready correctly. ### `partition_metadata_3_cb.cdl` and `partition_metadata_3_pb.cdl` These files are now generated at compile time by running the `decomp` tool on a new file `halo_test_mask.cdl`. This is in line with similar changes introduced by @joewallwork on the XIOS tests. --- # Other Details * `domain_decop` git commit has now been bumped to the latest version on main. This version of the decomp tool contains the corner neighbour metadata. ### Further work - Integrating halo exchange to nextsim is handled by PR #924
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.
Add periodic boundary test for Halo Exchange
Task List
Change Description
Test Description
HaloExchangePB_test.cppHaloExchangePB_test.cppis based onHaloExchangeCB_test.cpp. It creates test data for all the array types:HFieldVertexFieldDGFieldDGVectorCGVectorThey are created in such a way that the value of each cell can be calculated based on its indices. Therefore we can check after exchange that all of the cells have been exchanged successfully.
This would be a good PR for @niravshah241 to take over.