-
Notifications
You must be signed in to change notification settings - Fork 254
Refactor the buffer system and add methods for synchronize_communication!
#4939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
and splitting some tests to speed up the distributed tests... |
synchronize_communication!
| recv = on_architecture(arch, zeros(eltype(data), H, size_y, size(parent(data), 3)))) | ||
| # Either we pass corners or it is a 1D parallelization in x, note that, even for 2D parallelizations, we need a | ||
| # buffer that includes the corners (i.e. a OneDBuffer) if we are at the edge of the domain in y since we are not | ||
| # passing all the corners in that case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that we have AI to make things pretty easy, I think it makes sense to convert all these comments to docstrings. This opens the possibility to getting a gist of the program by looking at the docs
| on_architecture(arch, zeros(eltype(data), H, size(parent(data), 2), size(parent(data), 3)))) | ||
| else | ||
| return (send = on_architecture(arch, zeros(eltype(data), H, size(grid, 2), size(parent(data), 3))), | ||
| recv = on_architecture(arch, zeros(eltype(data), H, size(grid, 2), size(parent(data), 3)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this named tuple looks like the same thing as OneDBuffer. What's going on here? Do you use the type secretly for dispatch somehow? Do we need to use an explicit type here rather than a named tuple?
A comment might clear this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right it is only for dispatch, I can add another buffer type: TwoDBuffer
|
I'd love if we can take the opportunity of the refactor to clean up the code and make it readable, eg add comments in mysterious parts, use docstrings, and convert golf'd code to a more evocative style |
Co-authored-by: Gregory L. Wagner <[email protected]>
Co-authored-by: Gregory L. Wagner <[email protected]>
glwagner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn that looks good
github copilot at the rescue :) |
I am starting to dissect #4811 now that the formulation is complete and the tests pass, so that we do not have to merge 2000 lines and 107 files altogether.
This is a very simple start -> a quality of life refactor of the buffer system for distributed computations.