Fix north/south buffer swap in CommunicationBuffers#5427
Open
Fix north/south buffer swap in CommunicationBuffers#5427
Conversation
… adapt_structure Remove `Adapt.adapt_structure` for `CommunicationBuffers` (unused since individual buffer types all adapt to `nothing`) and fix the south/north argument order in `on_architecture` to match the struct field order (west, east, south, north, ...). Closes #5422 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
simone-silvestri
approved these changes
Mar 25, 2026
Collaborator
|
@briochemc the adapt is needed because the buffers are passed in the kernels in Oceananigans.jl/src/MultiRegion/multi_region_boundary_conditions.jl Lines 37 to 45 in b8012d5 However, these buffers are only passed for syntax convenience and thrown away inside GPU kernels. So if you find a clever way to detangle the buffers you can remove the adapt. It would require rewriting a custom fill_halo_regions!.
|
Collaborator
Author
|
OK so I have no clever ideas here so just reverting the method removal, and just keeping the swap fix. |
Collaborator
Author
|
@simone-silvestri @glwagner Are you happy to merge this? I could run the CI and wait for it to pass but I don't think that's needed here 🤷 (I can't merge without CI passing) |
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.
Remove
Adapt.adapt_structureforCommunicationBuffers(unused since individual buffer types all adapt tonothing) and fix the south/north argument order inon_architectureto match the struct field order (west, east, south, north, ...), as per #5422 (comment).Closes #5422