Build and install GROMACS with Arm Compiler and Arm Performance Libraries

  1. Within the gromacs directory, setup your locations, for example:

    export gromacs_root=$PWD
    export gromacs_build=$gromacs_root/build
    export gromacs_install=$gromacs_root/$gromacs_ver
  2. Create new directories called build and install:

    mkdir $gromacs_build
    mkdir $gromacs_install

    Keeping builds in separate directories is optional when building open source software, but is considered best practice. Having multiple build directories side-by-side is often useful for testing and debugging.

  3. Change into the build directory:

    cd $gromacs_build
  4. Run cmake with the following arguments:

    cmake \
    -DCMAKE_INSTALL_PREFIX=${gromacs_install} \
    -DBUILD_SHARED_LIBS=on \
    -DBUILD_TESTING=on \
    -DREGRESSIONTEST_DOWNLOAD=off \
    -DCMAKE_C_COMPILER=armclang \
    -DCMAKE_CXX_COMPILER=armclang++ \
    -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=${ARMPL_DIR}/lib/libarmpl_lp64.so \
    -DGMX_LAPACK_USER=${ARMPL_DIR}/lib/libarmpl_lp64.so \
    -DFFTWF_LIBRARY="${ARMPL_DIR}/lib/libarmpl_lp64.so" \
    -DFFTWF_INCLUDE_DIR=${ARMPL_DIR}/include \
    -DGMX_GPU=off \
    -DGMX_MPI=on \
    -DGMX_OPENMP=on \
    -DGMX_X11=off \
    ../
  5. Invoke make to build GROMACS with Arm Compiler for HPC.

    To improve the build speed, parallelize the make build job using the -j flag. Common practice is to use 2N+1 parallel jobs, where N=number of threads (or cores) on your system. For example, if the combined total of CPUs on your system is 64 threads, passing -j129 will enable a fast build:

    make -j 129 V=1

    To show the command lines passed to the compiler for each object file being compiled or linked, the optional V=1 flag is used.

  6. Install the build:

    make install
  7. Build the tests:

    make -i check
Previous Next