Page 1 of 1

OpenMM on heterogeneous hardware?

Posted: Tue Dec 17, 2024 9:29 pm
by hoa_thanh_le
Dear developers,

I read about OpenMM platforms in the user guide and tried several tutorials. They don't explicitly state support for heterogeneous hardware. So, I have several questions:
1) Does OpenMM support simulation simultaneously using multiple CPU threads and multiple GPUs? Or multiple CPU threads and multiple GPUs in different nodes of a cluster?
If not, 2) does OpenMM support simulation simultaneously using multiple CPU threads and 1 GPU in 1 node?

Kind regards,
Hoa T. Le

Re: OpenMM on heterogeneous hardware?

Posted: Wed Dec 18, 2024 11:38 am
by peastman
When using one of the GPU platforms (CUDA, OpenCL, HIP), by default it runs on a single GPU. You can tell it to use multiple GPUs in a single node by setting the "DeviceIndex" property. See http://docs.openmm.org/latest/userguide ... properties. This will generally give faster performance, though the speedup isn't linear. See the benchmarks at https://openmm.org/benchmarks. How much benefit you get from using multiple GPUs depends on the size of the system you're simulating, what type of GPUs you're using, and what type of bus they're communicating over.

When using one of the GPU platforms, nearly all work is done on the GPU. The number of CPU cores makes very little difference.

When using the CPU platform, by default it uses all CPU cores. You can limit it to a smaller number by setting the "Threads" property.

There's no support for parallelizing a single simulation across multiple nodes. There are some tools that can do it at a higher level. For example, openmmtools has a replica exchange implementation that can run each replica on a different node.

Re: OpenMM on heterogeneous hardware?

Posted: Thu Dec 19, 2024 6:24 am
by hoa_thanh_le
Dear Eastman,

Thank you for providing me with the information. I will take note to choose the most optimal hardware.

Best regards,
Hoa T. Le