Introduction

Quantum ESPRESSO (QE) 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. 

Official website for Quantum ESPRESSOhttps://www.quantum-espresso.org

Build Quantum ESPRESSO using Spack

Please refer to this link for getting started with Spack using AMD Zen Software Studio.

    # Example for building Quantum-Espresso with AOCC and AOCL. 
$ spack install quantum-espresso+elpa+scalapack hdf5=parallel %aocc ^amdfftw ^amdscalapack ^amdblis threads=openmp ^amdlibflame ^elpa ^openmpi fabrics=cma,ucx

Note: Quantum-ESPRESSO is built with MPI and OpenMP support by default.

Explanation of the command options:

Symbol Meaning
%aocc Build Quantum ESPRESSO with AOCC compiler.
+elpa +scalapack  Build Quantum ESPRESSO with ELPA and scalapack support.
^amdfftw Use amdfftw as the FFTW implementation.
^amdscalapack Use amdscalapack as the SCALAPACK implementation.
^amdblis threads=openmp Use amdblis as the BLAS implementation and enable OpenMP support.
^elpa Build Quantum ESPRESSO with ELPA Library.
^amdlibflame Use amdlibflame as the LAPACK implementation.
^openmpi fabrics=cma,ucx Use OpenMPI as the MPI provider and use the CMA network for efficient intra-node communication, falling back to the UCX network fabric, if required. 
Note: It is advised to specifically set the appropriate fabric for the host system if possible. Refer to Open MPI with AMD Zen Software Studio for more guidance.

Running Quantum ESPRESSO

Quantum ESPRESSO is a comprehensive suite for electronic-structure calculations and materials modeling based on density functional theory (DFT), plane waves, and pseudopotentials. The exact steps to run it depend on the specific system and calculation type. Quantum ESPRESSO provides sample input files in its examples directory. A common benchmark for Quantum ESPRESSO is the DEISA models that use plane-wave basis sets.

Run Script for AMD EPYC™ Processors

    # Load Quantum ESPRESSO built with AOCC
spack load quantum-espresso %aocc

## Obtain Benchmarks: AuSurf-Large112 Gold surface (112 atoms) and 8 k-points. DEISA pw benchmark.
wget https://hpc-forge.cineca.it/files/gara_tier_1/public/AuSurf-large.tar.gz
tar -xvf AuSurf-large.tar.gz
datafile="$PWD/ausurf-large.in"

# NP=Number of cores available in the system.
export NP=$(nproc) 
export OMP_NUM_THREADS=1
MPI_OPTS="-np ${NP} --bind-to core --map-by core"

# Run command 
mpirun $MPI_OPTS pw.x -npool 8 -in $datafile

Note: The above build and run steps apply to Quantum ESPRESSO-7.4.1, AOCC-5.0.0, AOCL-5.1.0, and OpenMPI-5.0.8 on Rocky Linux 9.5 (Blue Onyx) using Spack v1.1.0.dev0 and the builtin repo from spack-packages (commit id: 7824c23443).

For technical support on the tools, benchmarks and applications that AMD offers on this page and related inquiries, reach out to us at toolchainsupport@amd.com