TESLA

Subscribe
GPU-ACCELERATED GROMACS
The fastest, easiest way to improve simulation performance by up to 3X.
GPU- ACCELERATED GROMACS

How to Install GROMACS

GROMACS (version 5.1.2), can be downloaded from the GROMACS website.In the example below, command lines replace “VERSION” with 5.1.2 or whichever latest or desired GROMACS version you want to use. Since the time of this writing, version 5.1.4 has been released and has shown to provide faster performance than version 5.1.2.

To configure (with CMake) and build the GPU- accelerated version, the following software is required:

  • CMake
  • NVIDIA CUDA®*
  • GCC*
  • MPI (Optional. Use if the multi node version is needed).

*It’s recommended to use a recent CUDA version (currently 7.5) and the most recent gcc version supported by the given CUDA version.

$ wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-VERSION.tar.gz
$ tar -xzvf gromacs-VERSION.tar.gz
$ mkdir gromacs-VERSION-build
$ cd gromacs-VERSION-build
$ CC=gcc CXX=g++ cmake <GROMACS_SRC_DIR> -DGMX_OPENMP=ON -DGMX_GPU=ON -
DGPU_DEPLOYMENT_KIT_ROOT_DIR=<GDK_PATH> -DGMX_BUILD_OWN_FFTW=ON -
DGMX_PREFER_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=Release -
DCMAKE_INSTALL_PREFIX=<GROMACS_INSTALL_DIR>

CMake (Cross Platform Make) Options

Please replace <GROMACS_SRC_DIR> with the path to GROMACS source directory, for example, ../gromacs-5.1.2. <GDK_PATH> is where your GPU deployment kit is installed.

GROMACS 5.1 GPU clocks can be automatically adjusted for optimal performance via NVML. To build the optional NVML support the GPU Deployment Kit (GDK) is required.

After you download and install it, replace <GDK_PATH> with the path of gdk directory. (You may remove the option -DGPU_DEPLOYMENT_KIT_ROOT_DIR=<GDK_PATH> if you install GDK to the default location.) <GROMACS_INSTALL_DIR> also needs to be replaced with the desired installation directory; for example, /opt/gromacs.

Several other configurations are made here using CMake options, such as enabling OpenMP support using -DGMX_OPENMP=ON. With the -DGMX_BUILD_OWN_FFTW=ON configure option, FFTW is downloaded and build during the GROMACS build. This ensures that the correct optimizations flags for FFTW are chosen. Alternatively, a given FFTW installation can be used; see section FFTW of the GROMACS installation instructions for details. For detailed information about each option, please refer to GROMACS manual.

GROMACS with MPI

To build and install GROMACS with MPI support, you need to adjust the previous command to the following using the MPI compiler wrappers and adding "-DGMX_MPI=ON".

$ CC=mpicc CXX=mpicxx cmake <GROMACS_SRC_DIR> -DGMX_OPENMP=ON -DGMX_GPU=ON
-DGPU_DEPLOYMENT_KIT_ROOT_DIR=<GDK_PATH> -DGMX_MPI=ON -DGMX_BUILD_OWN_FFTW=ON -DGMX_PREFER_STATIC_LIBS=ON -
DCMAKE_BUILD_TYPE=Release -DGMX_BUILD_UNITTESTS=ON -DCMAKE_INSTALL_PREFIX=<GROMACS_INSTALL_DIR>

Build and Install

To build and install GROMACS, use the following command:

$ make
$ sudo make install

To check the correctness of GROMACS after installation, add the -DREGRESSIONTEST_DOWNLOAD=ON option to the configure command, and run “make check” before “make install”. Also, you can use “make -jN”, N is the number of cores in your platforms for faster make progress.

For additional details on installation options, please refer to the GROMACS install guide.

GET UP AND RUNNING