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

Refactor MPCD cell property calculations and communication #2013

Open
8 tasks
mphoward opened this issue Mar 3, 2025 · 0 comments
Open
8 tasks

Refactor MPCD cell property calculations and communication #2013

mphoward opened this issue Mar 3, 2025 · 0 comments
Assignees
Labels
task Something needs to be done.

Comments

@mphoward
Copy link
Collaborator

mphoward commented Mar 3, 2025

Description

This will require multiple steps to implement. I think the sequence of tasks will be:

  • Remove cell list data structures.
  • Calculate cell properties directly from particles not cell list.
  • Realign MPCD domain decomposition to snap with edges of cells.
  • Add forward and backward communication of particles to CollisionMethod.
  • Set a configurable buffer width for communicating MPCD particles, rather than use coverage box.
  • Sort particles using Hilbert or Z-order curve rather than cell list. Make a standard updater.
  • Consider removing / refactoring cell list to live in collision method.
  • Benchmark with both single and double particle data, and consider using a mixed-precision data model for MPCD particles.

Motivation and context

The supplementary material of https://doi.org/10.1016/j.cpc.2024.109494 (a similar benchmark / issue as discussed in #1887) shows that HOOMD underperforms their implementation on both CPUs and GPUs. On the CPU, HOOMD has better strong scaling but lower performance for most core counts. On the GPU, there is also a performance difference, but the strong scaling is now abysmal. Based on the implementation presented in Section 3, I think the main likely differences are:

  • Mixed precision particle data (they use float positions & double velocities). I reproduced their benchmark numbers using a fully double build of HOOMD. The impact of this could be assessed by rerunning with MPCD mixed precision.
  • Their cell property calculation is done using atomic operations, which bypasses the cell list. This should lead to fewer memory transactions, even if they are more scattered, and MPCD is typically quite memory bound.
  • They communicate MPCD particles to the rank owning the collision cell, then backward communicate the effect of the collision. This pattern may have less communication overhead than HOOMD's strategy to communicate overlapping cells because it is point-to-point. It also means that particles can drift farther before migration.

There are other benefits to refactoring as proposed above:

@mphoward mphoward added the task Something needs to be done. label Mar 3, 2025
@mphoward mphoward self-assigned this Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Something needs to be done.
Projects
None yet
Development

No branches or pull requests

1 participant