Skip to content

[Particle] Cache senders and receivers of the refreshed particles#2074

Open
vovannikov wants to merge 1 commit into
4C-multiphysics:mainfrom
vovannikov:particle_engine_refresh_particles
Open

[Particle] Cache senders and receivers of the refreshed particles#2074
vovannikov wants to merge 1 commit into
4C-multiphysics:mainfrom
vovannikov:particle_engine_refresh_particles

Conversation

@vovannikov

@vovannikov vovannikov commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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 Allreduce communication 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:

image

@vovannikov vovannikov changed the title Particle: cache senders and receivers of the refreshed particles [Particle] Cache senders and receivers of the refreshed particles Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants