QMCPACK

Build QMCPACK with Arm Compiler


Overview Before you begin Procedure Related information

How to build QMCPACK with Arm Compiler.

QMCPACK is an open-source, production-level, many-body, ab initio, Quantum Monte Carlo code for computing the electronic structure of atoms, molecules, and solids. For more information, see the QMCPACK website.

For the purposes of this build, the following components are used:

Component Form
QMCPACK Version 3.7.0
Arm Compiler for HPC
Version 19.1
Arm Performance Libraries Version 19.1
Open MPI Version 3.1.2
HDF5 Version 1.10.4
Boost Version 1.69.0
Operating system RHEL 7.5
Hardware
Cavium ThunderX2

Before you begin

  • Install Arm Compiler and Arm Performance Libraries. For more information, see our Installation instructions.
  • Build and install Open MPI. For more information on building Open MPI with Arm Compiler, see our instructions on Building OpenMPI with Arm Compiler.
  • Build and install HDF5. For more information on building HDF5 with Arm Compiler, see our instructions on Building HDF5 with Arm Compiler.
  • Build and install Boost. For more information on building Boost with Arm Compiler, see our instructions on Building Boost with Arm Compiler.
  • Install the following required OS packages: libxml2, libxml2-devel.
    These can be installed using the following command:
    yum -y install 

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