[Particle] Cache senders and receivers of the refreshed particles#2074
Open
vovannikov wants to merge 1 commit into
Open
[Particle] Cache senders and receivers of the refreshed particles#2074vovannikov wants to merge 1 commit into
vovannikov wants to merge 1 commit into
Conversation
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.
When performing the scalability studies I have identified a few places which can be optimized in order to improve performance. Most of those changes are related to optimizing the MPI communications: mainly reducing their number and the amount of data to be transferred.
As the result of this study, multiple modifications are proposed and split into 6 PRs. This whole sequence of optimizations was performed using Opus 4.6 assisting in reasoning about the bottlenecks.
This PR (and the follow-up PRs too) is tested using the ~5,000,000 particles SPH-PD simulation previously studied in #2063. The tests were again performed on a system with 2 AMD EPYC 7713 processors.
1. Cache senders and receivers to reuse the ghosts topology when communicating particles
This PR eliminates the per-step target-discovery collective inside the refresh path by reusing the directed-ghosting topology already known at ghost-rebuild time.
It also replaces an expensive
Allreducecommunication with small fixed point-to-point exchanges over a peer set.The caches are updated every time
communicate_direct_ghosting_map()runs.This is the effect of this modification: