Skip to content

Conversation

@biddisco
Copy link
Collaborator

@biddisco biddisco commented Dec 15, 2025

This PR contains cleanups to buffer management that should improve default performance

  1. Make buffer manager a singleton so that creation of communicator objects share the same buffer handler and reuse the same caches of buffers
  2. Fix a missing freeAllBuffers is particleUpdate
  3. replace the default kokkos views that for the storage of the buffers with unmanaged kokkos views that have stronger alignment (in this PR 1024 bytes) than the default kokkos views (normally 64 bytes)
  4. make the default buffer handler the default, rather than the logging one

This PR also adds support for logging using the spdlog library and the fmt library for clean messages, this can be enabled or disabled at compile time using IPPL_LOG_LEVEL off, trace, debug, warn, error, critical etc etc by default it is off, to use it, one needs to find_package spdlog, fmt which are now provided in uenvs for alps

@biddisco
Copy link
Collaborator Author

biddisco commented Dec 15, 2025

image This shows the performance with/without IPC enabled on alps. The buffer cleanup branch improves things, turning off ipc is still a major improvement

edit: erratum -the graph says heffte-gpu-enabled, but in fact it is disabled here.

@aaadelmann
Copy link
Member

John very nice results! Can you also show this on Lumi and/or on Beverin?

@aaadelmann
Copy link
Member

with GPU off you mean: -D Heffte_DISABLE_GPU_AWARE_MPI=OFF ?

@biddisco
Copy link
Collaborator Author

with GPU off you mean: -D Heffte_DISABLE_GPU_AWARE_MPI=OFF ?

yes. exactly this

@srikrrish
Copy link
Member

@biddisco Could you please pull and merge the latest master as it contains a fix for the Jülich's CI. I can then add the label and check if the unit tests are passing.

To improve messaging performance, we may wish to replace simple
kokkos:views in buffer handling with an alternative implementation that
allows for better alignment and caching.

Additionally, code may leak communication buffers via direct use of
kokkos views that are passed around from send/rec code into/out of
fields or attributes. Placing buffers behind an API reduces the chance
of this happening.
…copies

Always reset read/write pos on buffer when getBuffer is called
…memory

Kokkos::views are aligned to 64 byte boundaries, but communications can
benefit from stronger alignment. Support user defined (compile time)
alignment of higher order and create kokkos views inside manually
allocated cuda memory
@biddisco biddisco force-pushed the buffer-cleanup branch 2 times, most recently from 9cdd0f8 to 6f22411 Compare December 18, 2025 14:42
@aaadelmann
Copy link
Member

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

Successfully merging this pull request may close these issues.

4 participants