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

Simplify P3M C++ API #4969

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Simplify P3M C++ API #4969

merged 3 commits into from
Aug 2, 2024

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Aug 1, 2024

Fixes #4962
Partial fix for #4963

Description of changes:

  • disentangle FFTBackend methods: one per FFT transform operation, one per halo communication operation
  • make the floating-point type and CPU/GPU architecture template parameters of P3M classes
  • add support for P3M CPU and dipolar P3M CPU in single-precision mode

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jngrad jngrad changed the title P3m Simplify P3M C++ API Aug 1, 2024
jngrad added 2 commits August 2, 2024 01:16
CoulombP3M and DipolarP3M now have template parameters to select
floating-point precision and CPU/GPU architecture.
@jngrad jngrad force-pushed the p3m branch 2 times, most recently from cca9459 to 0263159 Compare August 2, 2024 00:24
@jngrad jngrad marked this pull request as ready for review August 2, 2024 00:35
@jngrad jngrad requested a review from RudolfWeeber August 2, 2024 00:36
@RudolfWeeber
Copy link
Contributor

Offline discussion:

  • we merge this PR onw.
  • Next step is to change the data ownership. The actual meshes (rs_mesh, ks_mesh) should be owned by the solvers. ks_mesh is only needed by the dipolar p3m
  • The forward and backward ffts in FFTBackend then take the meshs to transform as arguments
  • The halo gather/scatter funciotns can then also be moved out of the FT Backend. They would be called by the actual solvers before the forward and after the backwards transforms, respectively
  • The only link between the halo comm code and the fft is that they share the free functions to pack/unpack bllocks. These can be moved out of the fft and be used both, by the legacy fft implementaoitn and the halo communicaoitn (send_mesh)
  • The main challange in all this is to hide implementatoin specific data types, e.g., fft_vector or some future Kokkos data type, fro mclients, especially the script interface.

@jngrad jngrad added the automerge Merge with kodiak label Aug 2, 2024
@kodiakhq kodiakhq bot merged commit 2b7c8f2 into espressomd:python Aug 2, 2024
10 checks passed
@jngrad jngrad deleted the p3m branch August 2, 2024 16:09
@jngrad jngrad mentioned this pull request Aug 20, 2024
kodiakhq bot added a commit that referenced this pull request Aug 21, 2024
Fixes #4963
Follow-up to #4969

Description of changes:
- separate FFT backend from FFT buffers with type erasure
- extract FFT packing functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template the floating point data type in P3M
2 participants