Quantum ESPRESSO is an open-source software package developed by an Italian research group for performing first-principles electronic structure calculations (specifically Density Functional Theory). Quantum ESPRESSO can simulate the electronic and structural properties of materials at the nanoscale and is widely used by researchers around the world in the fields of condensed matter physics, materials science, and computational chemistry. computational chemistry.
This article explains the procedures for running Quantum ESPRESSO in the Matlantis environment.
[Disclaimer] We assume no responsibility for any issues or system damage that may occur in your environment as a result of executing the procedures described in this article. Please acknowledge this in advance and proceed at your own risk.
Installing Dependency Libraries
Before installing Quantum ESPRESSO, we need to install the external libraries Quantum ESPRESSO depends on. Specifically, we will install OpenMPI for parallel computing, FFTW for high-speed processing of Fourier transforms, and OpenBLAS, a numerical computation library containing matrix diagonalization algorithms.
(1) Installing OpenMPI
Quantum ESPRESSO supports "parallel computing," which distributes complex calculations across multiple CPU cores for high-speed processing. OpenMPI is the library required for this.
openmpi-5.0.8.tar.gz from OpenMPI website, upload it to Matlantis, and extract it.# Extract the download file $ tar -zxvf openmpi-5.0.8.tar.gz # Move to the extracted directory $ cd openmpi-5.0.8
# Create the installation directory $ mkdir -p ~/local/openmpi-5.0.8 # Run the configure script to set up the bulid environment # --prefix specifies the installation destination $ ./configure --prefix=/home/jovyan/local/openmpi-5.0.8 CC=gcc CXX=g++ FC=gfortran # Execute compilation (specify the number of parallel processes with the -j option) $ make -j 2 # Install $ make install
~/.bashrc:MPIROOT=/home/jovyan/local/openmpi-5.0.8 PATH=$MPIROOT/bin:$PATH LD_LIBRARY_PATH=$MPIROOT/lib:$LD_LIBRARY_PATH MANPATH=$MPIROOT/share/man:$MANPATH export MPIROOT PATH LD_LIBRARY_PATH MANPATH
$ source ~/.bashrc
(2) Installing FFTW
fftw-3.3.10.tar.gz from https://github.com/FFTW/fftw3, upload it to Matlantis, and extract the tar file.# Extract the file tar -zxvf fftw-3.3.10.tar.gz # Move to the directory cd fftw-3.3.10
# Specify the installation directory and set up the build environment # --enable-mpi enables MPI, --enable-threads enables thread parallelism $ ./configure --prefix=/home/jovyan/local/fftw-3.3.10 CC=gcc MPICC=mpicc F77=gfortran --enable-mpi --enable-threads # Compile $ make # Install $ make install
~/.bashrc:FFTWROOT=/home/jovyan/local/fftw-3.3.10 PATH=$FFTWROOT/bin:$PATH LD_LIBRARY_PATH=$FFTWROOT/lib:$LD_LIBRARY_PATH export FFTWROOT PATH LD_LIBRARY_PATH MANPATH
$ source ~/.bashrc
(3) Installing OpenBLAS
OpenBLAS-0.3.30.tar.gz from https://github.com/OpenMathLib/OpenBLAS/releases/tag/v0.3.30 and extract it on Matlantis.# Extract the file $ tar -zxvf OpenBLAS-0.3.30.tar.gz # Move to the directory $ cd OpenBLAS-0.3.30
cmake.# Create a build directory $ mkdir build && cd build # Create the installation directory $ mkdir ~/local/openblas-0.3.30 # Set up the build environment using cmake $ cmake .. \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_Fortran_COMPILER=gfortran \ -DNOFORTRAN=0 \ -DDYNAMIC_ARCH=OFF \ -DCMAKE_INSTALL_PREFIX="/home/jovyan/local/openblas-0.3.30" \ -DCMAKE_BUILD_TYPE=Release # Execute compilation and installation simultaneously $ make install
~/.bashrc:OBLASROOT=/home/jovyan/local/openblas-0.3.30 PATH=$OBLASROOT/bin:$PATH LD_LIBRARY_PATH=$OBLASWROOT/lib:$LD_LIBRARY_PATH export OBLASROOT PATH LD_LIBRARY_PATH MANPATH
Installing Quantum ESPRESSO
qe-7.0-ReleasePack.tgz from https://github.com/QEF/q-e/releases and extract it on Matlantis.# Extract the file tar -zxvf qe-7.0-ReleasePack.tgz # Move to the directory cd qe-7.0
./configure and cmake. Due to the version issue of cmake provided in the Matlantis environment, we will use ./configure here.# Execute the configure script # Specify compilers for MPI using FC and CC # Use FFLAGS to specify the FFTW include path and compiler error-avoidance options $ ./configure --prefix=/home/jovyan/local/q-e FC=mpif90 CC=mpicc CPP=cpp FFLAGS="-I/home/jovyan/local/fftw-3.3.10/include -fallow-argument-mismatch" # Compile the main program suite $ make pwall
- The
FFLAGS="-I/home/jovyan/local/fftw-3.3.10/include"specifies the link to the FFTW library we built earlier. - The
-fallow-argument-mismatchflag inFFLAGSis set to avoid errors that occur when compiling older code with a relatively new gfortran compiler. Without this flag, we encountered compilation errors.
pw.x.# Check the directory where the executable file is stored ls bin/ # Execute pw.x ./bin/pw.x
Waiting for input... and remain in an input standby state (you can exit using Ctrl+C). Program PWSCF v.7.0 starts on 22Jun2025 at 0:59: 3
This program is part of the open-source Quantum ESPRESSO suite
for quantum simulation of materials; please cite
"P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
"P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);
"P. Giannozzi et al., J. Chem. Phys. 152 154105 (2020);
URL http://www.quantum-espresso.org",
in publications or presentations arising from this work. More details at
http://www.quantum-espresso.org/quote
Parallel version (MPI), running on 1 processors
MPI processes distributed on 1 nodes
1056 MiB available memory on the printing compute node when the environment starts
Waiting for input...