Quantum Espresso

How to build Quantum Espresso with Arm Compiler for HPC.

Introduction

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

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

Component
Form
Quantum Espresso
Version 6.2.1
Open MPI Version 2.1.2
Operating System
Ubuntu 16.04
Hardware Cavium ThunderX1
Arm Compiler for HPC
Version 18.0

Download

Create a new directory called QE:

mkdir ~/QE
cd ~/QE

Download the Quantum Espresso source files by cloning the source repositories, using:

wget http://www.qe-forge.org/gf/download/frsrelease/240/1075/qe-6.2.1.tar.gz
wget http://www.qe-forge.org/gf/download/frsrelease/240/1073/qe-6.2.1-test-suite.tar.gz

Unpack the qe-6.2.1.tar.gz tarball and change into the unpacked qe-6.2.1 directory, using:

tar zxf qe-6.2.1.tar.gz
cd 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 using:

    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 step) Set the OpenMP variable if you want an OpenMP build, using:

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

    ./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, using:

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

    make all
    make install

Run a simple benchmark

To run the Quantum Espresso test suite:

  1. Change into the ~/QE source directory:

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

    tar zxf qe-6.2.1-test-suite.tar.gz
  3. Change into the test suite directory and build the tests, using:

    cd test-suite/
    make run-tests-parallel

More resources