glotzerlab / hoomd-blue

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.
http://glotzerlab.engin.umich.edu/hoomd-blue
BSD 3-Clause "New" or "Revised" License
343 stars 132 forks source link

Remove the single process, multi-gpu feature. #1936

Closed joaander closed 2 weeks ago

joaander commented 2 weeks ago

Description

Remove the single process, multi-gpu feature.

Using Multiple GPUs via MPI domain decomposition is still supported.

Motivation and context

Resolves #1664

How has this been tested?

CI checks.

Checklist:

mphoward commented 2 weeks ago

@joaander I saw this PR open up (great!) and had a quick question: what does removing this code path mean for GlobalArray vs. GPUArray for developers in current & future code? I remember the GlobalArray pattern being rather complicated (CRTP) but in the end, I think degrading to essentially just a GPUArray if there is only 1 GPU per process?

https://github.com/glotzerlab/hoomd-blue/blob/ec0b84cdf49987f9d6fdd5d1f6d4bfa216edbfc7/hoomd/GlobalArray.h#L13-L16

joaander commented 2 weeks ago

I am planning to leave GlobalArray in place for now. A future PR might remove it (and GlobalVector). Care must be taken in cases where force_managed is set to true: https://github.com/glotzerlab/hoomd-blue/blob/ec0b84cdf49987f9d6fdd5d1f6d4bfa216edbfc7/hoomd/GlobalArray.h#L224-L236 These cases will need to maintain the use of managed memory.

In all cases where force_managed = false (the default), GlobalArray is GPUArray now. Future code should continue to use GPUArray in all cases that managed memory is not necessary.

joaander commented 2 weeks ago

It would appear that force_managed is never set true. In that case, maybe the GlobalArray / GlobalVector removal is coming soon as it is primarily a global search and replace operation.