QMCPACK

Build QMCPACK with Arm Compiler


Overview Before you begin Procedure Related information

Procedure

  1. Download and unpack the packages:

    wget https://github.com/QMCPACK/qmcpack/archive/v3.7.0.tar.gz
    tar xf v3.7.0.tar.gz
    cd qmcpack-3.7.0
  2. Configure Arm Compiler:

    CC=armclang
    CXX=armclang++
  3. Configure the build:

    1. Set the correct path for your installation of HDF5 and Boost:

      export HDF5_DIR=</path/to/hdf5/install/>
      export BOOST_DIR=</path/to/boost/install>

      Replace /path/to/ with the path to your installation.

    2. Ensure the correct environment variables are set for Arm Performance Libraries:

      export ARMPL_DIR=</path/to/armpl/directory/>
      export ARMPL_LIBRARIES=$ARMPL_DIR/lib

      Replace /path/to/ with the path to your installation.

    3. Set the correct build flags:

      export FFTW=$ARMPL_LIBRARIES/libarmpl_lp64.so
      export FFTW_INCLUDE=$ARMPL_DIR/include
      export LAPACK=$ARMPL_LIBRARIES/libarmpl_lp64.so
      export CFLAGS="‑O3 ‑mcpu=native ‑ffp‑contract=fast ‑fsimdmath"
      export CXXFLAGS="$CFLAGS"
    4. Change into the build directory and run cmake as follows:

      mkdir -p build
      cd build
      
      cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx \
            -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
            -DLAPACK_LIBRARIES=$LAPACK \
            -DFFTW_INCLUDE_DIR=$FFTW_INCLUDE \
            -DFFTW_LIBRARIES=$FFTW \
            -DCMAKE_EXE_LINKER_FLAGS=$LDFLAGS \
            -DBoost_INCLUDE_DIRS=$BOOST_ROOT/include  ../.
  4. Build and install the application:

    make -j
  5. To test the build, navigate to the qmcpack-3.7.0/build source directory, and run:

    ctest -R short
Previous Next