ECP-WarpX / WarpX

WarpX is an advanced electromagnetic & electrostatic Particle-In-Cell code.
https://ecp-warpx.github.io
Other
292 stars 186 forks source link

Optimize MPI `Exchange` function between PML boxes and regular boxes #316

Open RemiLehe opened 5 years ago

RemiLehe commented 5 years ago

When running with PML, WarpX performs MPI guard cell exchanges:

While FillBoundary is getting faster thanks to various efforts on the AMReX side, I think that PML::Exchange is not being optimized to the same level. In particular, PML::Exchange makes many calls to ParallelCopy (essentially for convenience), some of them exchanging data that is mostly 0 by construction. There could be opportunities for optimization.

RemiLehe commented 4 years ago

Also, it seems that PML::Exchange is called every time that FillBoundary is called. This is not necessarily needed, since FillBoundary is sometimes called before field gathering, in which case the PML do not need to be updated.