View all files | ||||
This plugin adds HIP platform that allows to run OpenMM on CDNA and RDNA AMD GPUs on AMD ROCm™ open software platform.
This plugin requires hipFFT and rocFFT, install them from ROCm repositories:
This command creates a new environment, installs OpenMM and the plugin and activates the new environment.
Note: cudatoolkit is a large (about 1 GB) dependency of openmm package, however it is not required for the HIP plugin. It is possible to install a tiny "shim" package instead (for more information see this comment):
Verify your installation (HIP must be one of available platforms):
If there is no HIP among available platforms check why the HIP platform fails to load:
Run tests:
Run benchmarks (see more options python benchmark.py --help):
To remove OpenMM and the HIP plugin, run:
This project uses CMake for its build system.
The plugin requires source code of OpenMM, it can be downloaded as an archive here or as a Git repository:
To build the plugin, follow these steps:
Create a directory in which to build the plugin.
Run the CMake GUI or ccmake, specifying your new directory as the build directory and the top level directory of this project as the source directory.
Press "Configure".
Set OPENMM_DIR to point to the directory where OpenMM is installed. This is needed to locate the OpenMM header files and libraries.
Set OPENMM_SOURCE_DIR to point to the directory where OpenMM source code is located.
Set CMAKE_INSTALL_PREFIX to the directory where the plugin should be installed. Usually, this will be the same as OPENMM_DIR, so the plugin will be added to your OpenMM installation.
Press "Configure" again if necessary, then press "Generate".
Use the build system you selected to build and install the plugin. For example, if you selected Unix Makefiles, type make install.
Here are all commands required for building and installing OpenMM with HIP support from the latest source code:
If you do not want to install OpenMM Python libraries into the user site-packages directory remove -D OPENMM_PYTHON_USER_INSTALL=ON.
Use ROCM_PATH environment variable if ROCm is not installed in the default directory (/opt/rocm).
To run all the test cases build the "test" target, for example by typing make test, or call ctest --output-on-failure --repeat until-pass:3 (retry three times so stochastic tests have a chance).
There are 3 implementations (backends) of FFT, the default is VkFFT. If some tests fail or you suspect that your simulation with PME produces incorrect results, please try different backends:
By default, the HIP Platform builds kernels with the hipcc compiler. To run the compiler, paths in the following order are used:
There is an alternative way to compile kernels: hipRTC, it is implemented by plugins/hipcompiler. To enable this way:
The HIP Platform uses OpenMM API under the terms of the MIT License. A copy of this license may be found in the accompanying file MIT.txt.
The HIP Platform is based on the CUDA Platform of OpenMM under the terms of the GNU Lesser General Public License. A copy of this license may be found in the accompanying file LGPL.txt. It in turn incorporates the terms of the GNU General Public License, which may be found in the accompanying file GPL.txt.
The HIP Platform uses VkFFT by Dmitrii Tolmachev under the terms of the MIT License. A copy of this license may be found in the accompanying file MIT-VkFFT.txt.