WarpX icon indicating copy to clipboard operation
WarpX copied to clipboard

Add Memory Calculator

Open n01r opened this issue 2 years ago • 3 comments

This PR contains a Python tool for estimating the memory consumption of a simulation box, given that it is rectangular. The tool is aimed at helping with simulation preparation. However, it is still relatively rough around the edges.

I am also a bit unsure if I have captured the existing variants of random number generators correctly and how many other PML configurations there are that change the memory consumption.

To Do

  • [x] Documentation: write usage example in User > Workflows

Follow-up PR

  • [ ] Add memory footprint of diagnostics

n01r avatar Aug 09 '22 01:08 n01r

@n01r please remove the WIP if this is ready for review. We can merge a first version w/o diagnostics.

ax3l avatar Sep 02 '22 16:09 ax3l

As mentioned on Slack, there are a few additional arrays stored in memory with PSATD:

  • Standard PSATD, Galilean PSATD, averaged Galilean PSATD, w/ J constant in time - 2D/3D https://github.com/ECP-WarpX/WarpX/blob/43c110c3c3e2e5a1279fe6612c1540713744911f/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJConstantInTime.H#L119-L124
  • Standard PSATD, w/ J constant in time - RZ https://github.com/ECP-WarpX/WarpX/blob/43c110c3c3e2e5a1279fe6612c1540713744911f/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmRZ.H#L69-L70
  • Galilean PSATD, w/ J constant in time - RZ https://github.com/ECP-WarpX/WarpX/blob/43c110c3c3e2e5a1279fe6612c1540713744911f/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmGalileanRZ.H#L62-L63
  • Standard PSATD, multi-J, with J linear in time - 2D/3D https://github.com/ECP-WarpX/WarpX/blob/43c110c3c3e2e5a1279fe6612c1540713744911f/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmJLinearInTime.H#L118-L120
  • Standard PSATD in PMLs - 2D/3D https://github.com/ECP-WarpX/WarpX/blob/43c110c3c3e2e5a1279fe6612c1540713744911f/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPml.H#L71
  • Standard PSATD in PMLs - RZ https://github.com/ECP-WarpX/WarpX/blob/43c110c3c3e2e5a1279fe6612c1540713744911f/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithmPmlRZ.H#L59

Whether or not some of those are actually allocated can be seen from the implementation in the corresponding cpp files.

EZoni avatar Oct 04 '22 18:10 EZoni

@n01r ping :)

ax3l avatar Dec 12 '23 00:12 ax3l