Quantum Espresso for XC40

What Is Quantum Espresso?

Quantum Espresso (QE) is a suite of codes for electronic structure calculations and materials research. This code uses Density Functional Theory calculations with periodic boundary conditions to estimate energies, forces, and other properties of atomic scale systems. QE runs in parallel (MPI and OpenMP) and is based on plane waves basis functions and pseudopotentials.

How to Obtain the Code

QE is an open-source project and can be obtained via http://www.quantum-espresso.org/.

Building on Theta

QE uses autotools to create a make.inc file required to compile the code. First, obtain a copy of QE-6.0 source code on the Theta login nodes.

We suggest compiling the code with Intel compilers, Cray parallel algebra libraries, and the Fast Fourier Transformation library FFTW3 (use ‘module add fftw/3.3.4.10’). For example, the output of the command ‘module list’ could look like this:

Currently Loaded Modulefiles:

 1) modules/3.2.10.5
 2) eproxy/2.0.14-4.3
 3) intel/17.0.2.174
 4) craype-network-aries
 5) craype/2.5.9
 6) cray-libsci/16.11.1
 7) udreg/2.3.2-7.54
 8) ugni/6.0.15-2.2
 9) pmi/5.0.11
10) dmapp/7.1.1-39.37
11) gni-headers/5.0.11-2.2
12) xpmem/2.1.1_gf9c9084-2.38
13) job/2.1.1_gc1ad964-2.175
14) dvs/2.7_2.1.67_geb949b6-1.0000.eb949b6.2.32 
15) alps/6.3.4-2.21
16) rca/2.1.6_g2c60fbf-2.265
17) atp/2.1.0
18) PrgEnv-intel/6.0.3
19) craype-mic-knl
20) cray-mpich/7.5.3
21) fftw/3.3.4.10

Inside the source code directory, QE can be configured with the follow command in a shell terminal:

./configure \
 --prefix=/home/myhome/mypath \
 FC=ftn CC=cc FFLAGS="-O3 -g -qopenmp -I/opt/cray/pe/fftw/3.3.4.10/mic_knl/include -P"  \
  FFT_LIBS="-L/opt/cray/pe/fftw/3.3.4.10/mic_knl/lib -lfftw3f_omp -lfftw3 " --enable-openmp --enable-parallel \
  --with-scalapack  --host=x64_64 BLAS_LIBS=" " LAPACK_LIBS=" "

To build the code, use ‘make’ and install it with ‘make install.’

Running QE Jobs on Theta

Below is an example of a submission script of running the binary pw.x of QE in Theta:

#!/bin/bash
#COBALT -n 8
#COBALT -t 10
#COBALT -q default
#COBALT -A my_project
#COBALT -O my_test

export OMP_NUM_THREADS=16
export OMP_PLACES=threads
export OMP_PROC_BIND=spread
PROC_PER_NODE=32

pw=/fullpathtobinaries/bin/pw.x

echo "Running Cobalt Job $COBALT_JOBID."

aprun -n $(($COBALT_PARTSIZE * $PROC_PER_NODE)) -N $PROC_PER_NODE -d 16 $pw -in ./test.in &> ./out
EXIT_STATUS=$?

This script file can be submitted as ‘qsub script.sh’, assuming you have a ‘test.in’ file in place.

References

QE User Manual 
Alternative Compilations of the Code