Repository navigation
Conversation
`index_glb_to_loc(offset, side)` returned one past the last local index when the offset covered the whole local subdomain, so the thickness of a rank lying entirely in a left or right boundary layer exceeded its extent by one, and the boundary loop ran past the rank's data. Return the last index instead, and convert it to a count in the same way for left, right and middle SubDimensions
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3068 +/- ##
==========================================
- Coverage 84.23% 84.21% -0.02%
==========================================
Files 258 258
Lines 57070 57091 +21
Branches 4874 4874
==========================================
+ Hits 48072 48079 +7
- Misses 8170 8188 +18
+ Partials 828 824 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
index_glb_to_loc(offset, side)returned one past the last local index when the offset covered the whole local subdomain, so a rank lying entirely in a left/right boundary layer got a thickness one larger than its extent and the loop ran past its data: with 4 ranks x 16 points and a 20-point layer, rank 0 and rank 3 got 17, corrupting the heap.The function now always returns an index, as asked on #2993, and the callers convert it to a count (left, right and middle alike; middle was already correct on main). #3034's call-site clamp also fixes the left/right symptom; this is the alternative that keeps the function's contract, and #3034's tests pass on top of it without the clamp.
Tests: a serial index case in
test_data.py;test_mpi.py::TestOperatorAdvanced::test_thickness_covering_ranks[left|right|middle](4 ranks). With the whole fix reverted the three MPI cases fail; with only the conversion reverted,middlefails (15 != 16).Refs #2993, #3034.
🤖 Generated with Claude Code