Skip to content
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

Introduce Heffte as FFt backend for P3M #4999

Open
RudolfWeeber opened this issue Oct 1, 2024 · 0 comments
Open

Introduce Heffte as FFt backend for P3M #4999

RudolfWeeber opened this issue Oct 1, 2024 · 0 comments

Comments

@RudolfWeeber
Copy link
Contributor

Overview

  • https://github.com/icl-utk-edu/heffte
  • 3d FFT library with MPI and GPU-Support, backends include fftw, mkl, cufft, ...
  • Probably faster than the custom stuff in ESPResSo
  • The API is uncomplicated
  • build sysem based on CMake

Integration in ESPResSo

  • The library requires the data to be transformed to be contiguous, as far as I understand
  • The data in ESPResSo
    • is contiguous in k-space
    • not contiguous in real-space, because then, there are halo regions for the charge assignment
  • This mixture of data layouts seems to be handled within the 3d FFT code ESPResSo, which selectively skips the halo regions in the forward transform and leaves space for them in the back transform.

Short term strategy

  • Copy the real space grid without halo into a a contigious region before transforming
  • This way, the FFTBufferLegacy class does not have to be replaced at the same time
  • Leave teh back-transofmr unchanged. This way, we can see, if the switch to Heffte is worth it

Notes

  • The real space array (holding the charges) has halo layers. Including the halo layers, the storage is contiguous and ROW_MAJOR. This can be inferred from p3m/interpolation.hpp:p3m_calculate_interpolation_weights()
  • The k-space charge density is contiguous, as can be inferred form the loop boundaries the long rnage kernels
  • The actual buffer size (storaage alocated for rs_scalar) is determined by what the current 3d fft requires, whcih can be more then the mesh size+halo layers cubed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant