Overview

This resource topic addresses how to build Quantum Espresso with Arm Compiler for HPC.

Quantum Espresso is an integrated suite of open-source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.

For more information on Quantum Espresso, visit the Quantum Espresso webpage.

Version information

The following components are used in this build:

Component
Form
Quantum Espresso
Version 6.2.1
Arm Compiler for HPC
Version 19.2
Arm Performance Libraries Version 19.2
Open MPI Version 4.0.1
Operating System
Ubuntu 16.04
Hardware Cavium ThunderX2

Recipes for other versions of the application are available in the GitLab Packages Wiki.

Download

  1. Create a new directory called QE:
    mkdir ~/QE
    cd ~/QE
  2. Download the Quantum Espresso source files by cloning the source repositories, using:
    wget https://gitlab.com/QEF/q-e/-/archive/qe-6.2.1/q-e-qe-6.2.1.tar.gz
    wget https://gitlab.com/QEF/q-e/-/archive/qe-6.2.1/q-e-qe-6.2.1-test-suite.tar.gz
  3. Unpack the q-e-qe-6.2.1.tar.gz tarball and change into the unpacked q-e-qe-6.2.1 directory, using:
    tar zxf q-e-qe-6.2.1.tar.gz
    cd q-e-qe-6.2.1

Compiler configuration

Ensure that your paths are set up appropriately for Arm Compiler for HPC, for example:

export PATH=/proj/ArmCompiler/bin:$PATH
export LD_LIBRARY_PATH=/proj/ArmCompiler/lib:$LD_LIBRARY_PATH

To configure your installation of Arm Compiler for HPC, use:

export F77=armflang
export F90=armflang
export FC=armflang
export CC=armclang
export CFLAGS="-O3 -g -D__PGI -mcpu=native"
export FFLAGS="-O3 -g -D__PGI -mcpu=native"

Build and install Quantum Espresso with Arm Compiler for HPC

To build and install Quantum Espresso with Arm Compiler for HPC:

  1. Set your build directory and library path:

    BUILD_DIR=</path/to/build_directory/>
    ARM_LIB_DIR=<path/to/armpl/lib/>

    replacing /path/to/build_directory/ and /path/to/armpl/lib/ with the appropriate directory paths for your build and armpl/lib directory, respectively.

  2. Set the configuration values, using:

    ARM_LIB=armpl_lp64
    F77=armflang
    F90=armflang
    FC=armflang
    CC=armclang
    CFLAGS="-O3 -g -D__PGI -mcpu=native"
    FFLAGS="-O3 -g -D__PGI -mcpu=native"
    export DEFS="__PGI"
  3. (Optional) Set the OpenMP variable if you want an OpenMP build:

    WITH_OPENMP=--enable-openmp
  4. Configure the Quantum Espresso build:

    ./configure --prefix=$BUILD_DIR $WITH_OPENMP ARCH=arm BLAS_LIBS="-L$ARM_LIB_DIR -l$ARM_LIB" FFT_LIBS="-L$ARM_LIB_DIR -l$ARM_LIB" F77=$F77 F90=$F90 FC=$FC CC=$CC CFLAGS="$CFLAGS" FFLAGS="$FFLAGS" LDFLAGS="$LDFLAGS"
  5. Edit the make.inc file and change the -D__FFTW3 flag to be -D__ARM_LIB flag:

    sed -i "s|FFTW3|ARM_LIB|" make.inc
  6. Make and install:

    make all
    make install

Run a simple benchmark

To run the Quantum Espresso test suite:

  1. Change into the ~/QE source directory:

    cd ~/QE/q-e-qe-6.2.1
  2. Unpack the test suite from the q-e-qe-6.2.1-test-suite.tar.gz tarball:

    tar zxf ../q-e-qe-6.2.1-test-suite.tar.gz
  3. Change into the test suite directory and build the tests:

    cd test-suite/
    make run-tests-parallel