Conversation
added 4 commits
September 8, 2026 11:54
Rewrite the tile->tile coordinate transforms in mpp_define_nest_domains. Replace `convert_index_to_nest` and `convert_index_to_coarse` with a single generalized `convert_index` function. The old coordinate transforms assumed that data being transferred from a coarse PE to a fine PE would come either from the east (in the case of a horizontal overhang) or from the north (in the case of a vertical overhang). The old transforms did not allow data to be transferred from the south or from the west. The new transforms allow data to be transferred to the nest from any adjacent coarse-grid tile; however, large overhangs which span multiple tiles are no longer supported.
The test_mpp_nesting unit test currently has a test case where a nest spans two full tiles in the horizontal direction. This case is no longer supported, as the new coordinate transforms can only pull data from adjacent tiles. Therefore, the size of the nest has been reduced so that its overhang doesn't extend beyond the adjacent tile.
`compute_overlap_coarse_to_fine` seems to erroneously use `shalo` and `nhalo` respectively to adjust the size of the north and south halo buffers in the horizontal dimension, rather than `ehalo` and `whalo` as one would expect. This bug has no effect in the normal scenario where all halo sizes are the same, but it would produce incorrect halo regions if non-equal halo sizes were used.
Modify coordinates using ishift and jshift before, rather than after, coordiante transforms are performed.
J-Lentz
requested review from
bensonr,
rem1776,
uramirez8707 and
vithikashah001
as code owners
September 8, 2026 19:23
added 3 commits
September 8, 2026 15:52
Add doxygen comments to `convert_index`.
This branch has not been deployed
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.
Description
In
compute_overlap_coarse_to_fine, which determines overlaps for coarse-to-fine updates, the existing tile->tile coordinate transforms do not work when a nest's west or south halo overhangs across the coarse grid's tile boundary. This has been resolved by rewriting the coordinate transforms. The two existing coordinate transform functions,convert_index_to_nestandconvert_index_to_coarse, have been replaced with a unifiedconvert_indexfunction.While the old coordinate transforms assumed that data being transferred from a coarse PE to a fine PE would come either from the east (in the case of a horizontal overhang) or from the north (in the case of a vertical overhang), the new transforms allow data to be transferred from any adjacent tile on the coarse grid. However, large overhangs which extend beyond adjacent tiles are no longer supported.
How Has This Been Tested?
Existing unit tests pass, with one modification. Namely, in
test_mpp_nesting.sh, there is a case where a nest spans two full tiles in the horizontal direction: the size of this nest has been reduced so that its overhang no longer extends beyond the adjacent tile.Coarse-to-fine update results seem to be correct for nests at tile edges and in corners. However, new unit tests are needed for these cases (TODO).
Checklist:
make distcheckpasses