Installation of Quantum Espresso v7.1 on Snellius supercomputer using CMake and Intel compilers

Image credit: Snellius website

Snellius is the Dutch National supercomputer with 14 petaflop/s computing power, hosted at SURF Amsterdam. The system facilitates scientific research carried out in many Universities, independent research institutes, governmental organizations, and private companies in the Netherlands.

Quantum ESPRESSO is a suite for first-principles electronic-structure calculations and materials modeling, distributed for free and as free software under the GNU General Public License. It is based on density-functional theory, plane wave basis sets, and pseudopotentials. In this post, we will install the latest version of the Quantum Espresso on the Snellius supercomputer optimized for the AMD EPYC processors using the Intel compilers and CMake.

Load Modules and set the environment:

module load 2021
module load intel/2021a
module load intel-compilers/2021.2.0
module load iimpi/2021a
module load imkl-FFTW/2021.4.0-iimpi-2021b
module load imkl/2021.2.0-iimpi-2021a

Make sure that the LibXC package is installed and is available in the library path. If not, you can install it using the following commands:

export LIBXCROOT=/path/to/libxc-6.1.0

We will use CMake to build and install the package. Here, we will optimize the code for the AMD EPYC processors using the AVX2 instruction flags.

cmake -S. -Bbuild \
-DCMAKE_Fortran_COMPILER=mpiifort \
-DCMAKE_INSTALL_PREFIX=/installation/path/QE-7.1 \
-DCMAKE_Fortran_FLAGS="-O3 -march=core-avx2 -finline -ip -align array64byte -fma -ftz -fomit-frame-pointer" \
-DCMAKE_C_FLAGS="-O3 -march=core-avx2" \

cmake --build build -j 128

cd build
make install
ctest -j64 --output-on-failure -L "pw|cp" -LE epw

Note the at the ctest only works for pw and cp.

You can use optional CMake variables ESPRESSO_PSEUDO, NETWORK_PSEUDO, TESTCODE_NPROCS(default 4) and TESTCODE_NTHREADS(default 1) to override default values.

The environment variable CTEST_XX_OPTIONS can be used to pass additional command line options. For example, -DCTEST_PW_OPTIONS="-ndiag 1" passes -ndiag 1 to pw.x when it is launched by ctest.

Ravindra Shinde
Ravindra Shinde
Research Scientist

I am a theoretical and computational condensed matter physicist and quantum chemist. I am currently working as a researcher at the University of Twente, the Netherlands. I am also the founder of The Science Dev.