Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the main program installation directory.
    cd /path/to/GROMACS
  3. Decompress the installation package.
    tar -xvf gromacs-2019.3.tar.gz
  4. Go to the directory generated after the decompression and create a build directory.
    cd gromacs-2019.3
    mkdir build
  5. Edit the configuration file.
    1. Open the configuration file.
      vi cmake/gmxManageNvccConfig.cmake
    2. Press i to enter the insert mode and comment out lines 116, 117, 120, and 121.

      After performing 5.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the settings and exit.
  6. Perform the configuration.
    sed -i '212s/return fftw_version;/return 0;/g' src/gromacs/utility/binaryinformation.cpp
    sed -i '214s/return fftwf_version;/return 0;/g' src/gromacs/utility/binaryinformation.cpp
    sed -i '457s/int fftwflags = FFTW_DESTROY_INPUT;/int fftwflags = 0;/g' src/gromacs/fft/fft5d.cpp
    sed -i '587s/FFTWPREFIX(cleanup)();/fftwf_cleanup_threads();/g' src/gromacs/fft/fft_fftw3.cpp
    cd build
    FLAGS="-march=armv8.2-a -mcpu=tsv110"; CFLAGS=$FLAGS CXXFLAGS=$FLAGS LDFLAGS="-fuse-ld=lld" CC=mpicc CXX=mpicxx \
    cmake -DCMAKE_INSTALL_PREFIX=/path/to/GROMACS  \
    -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/lib/libopenblas.a \
    -DGMX_LAPACK_USER=/path/to/OPENBLAS/lib/libopenblas.a \
    -DFFTWF_LIBRARY=/path/to/FFTW/lib/libfftw3f.so \
    -DFFTWF_INCLUDE_DIR=/path/to/FFTW/include \
    -DGMX_GPU=on \
    -DGMX_OPENMP=on \
    -DGMX_X11=off  \
    -DGMX_MPI=on \
    -DHWLOC_LIBRARIES=/usr/lib64 \
    -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
    ../
  7. Perform the compilation.
    make -j40 V=1
    make -j40 install
  8. Check whether an executable file is generated.
    ll /path/to/GROMACS/bin/gmx_mpi

    If the command output contains the gmx_mpi file information, an executable file is successfully generated.

  9. Configure the environment variables.
    export PATH=/path/to/GROMACS/bin:$PATH