Description
This will require multiple steps to implement. I think the sequence of tasks will be:
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:
Description
This will require multiple steps to implement. I think the sequence of tasks will be:
CollisionMethod.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:
There are other benefits to refactoring as proposed above: