Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Installing GROMACS

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to decompress the GROMACS installation package:
    tar -xvf gromacs-2019.3.tar.gz
  3. Run the following command to switch to the directory generated after the package is decompressed:
    cd Gromacs-2019.3
  4. Run the following commands to create a build directory and switch to the directory:
    mkdir build
    cd build
  5. Run the following command to perform configuration:
    FLAGS="-mcpu=tsv110"; CFLAGS=$FLAGS CXXFLAGS=$FLAGS LDFLAGS="-lgfortran" CC=mpicc CXX=mpicxx \
    /path/to/CMAKE/bin/cmake \
    -DCMAKE_INSTALL_PREFIX=/path/to/GROMACS/gromacs-2019.3 \
    -DBUILD_SHARED_LIBS=on \
    -DBUILD_TESTING=on \
    -DREGRESSIONTEST_DOWNLOAD=off \
    -DGMX_BUILD_OWN_FFTW=off \
    -DGMX_SIMD=ARM_NEON_ASIMD \
    -DGMX_DOUBLE=off \
    -DGMX_EXTERNAL_BLAS=on \
    -DGMX_EXTERNAL_LAPACK=on \
    -DGMX_FFT_LIBRARY=fftw3 \
    -DGMX_BLAS_USER=/path/to/OPENBLAS/OpenBLAS-0.3.6/lib/libopenblas.a \
    -DGMX_LAPACK_USER=/path/to/OPENBLAS/OpenBLAS-0.3.6/lib/libopenblas.a \
    -DFFTWF_LIBRARY=/path/to/FFTW/libfftw3f.so \
    -DFFTWF_INCLUDE_DIR=/path/to/FFTW/include \
    -DGMX_GPU=off \
    -DGMX_MPI=on \
    -DGMX_OPENMP=on \
    -DGMX_X11=off \
    ../
  6. Run the following commands to perform compilation and installation:
    make -j40 V=1
    make -j40 install
  7. Run the following command to check whether an executable file is generated:
    ll /path/to/GROMACS/bin/gmx_mpi
    -rwxr-xr-x 1 root root 83656 Jul 31 02:51 gmx_mpi
  8. Run the following commands to set environment variables:
    export PATH=/path/to/GROMACS/bin:$PATH