Quantum ESPRESSO
What is Quantum ESPRESSO?
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.
GPU Acceleration Available
Quantum ESPRESSO supports GPU acceleration on H200 GPUs.
Separate modules are available for CPU and GPU versions.
Base Environment
Quantum ESPRESSO is provided via the environment modules system.
Loading Quantum ESPRESSO
CPU Version
GPU Version
Load GPU module
module load nvhpc/24.11
module load qe/7.5-gpu
Best Practice
Always verify the loaded modules:
Example: SCF Calculation (pw.x)
si.scf.in
Silicon SCF calculation
&CONTROL
calculation = 'scf'
prefix = 'silicon'
pseudo_dir = './'
outdir = './tmp'
/
&SYSTEM
ibrav = 2, celldm(1) = 10.26, nat = 2, ntyp = 1,
ecutwfc = 30.0
/
&ELECTRONS
/
ATOMIC_SPECIES
Si 28.086 Si.UPF
ATOMIC_POSITIONS (alat)
Si 0.00 0.00 0.00
Si 0.25 0.25 0.25
K_POINTS (automatic)
2 2 2 1 1 1
Pseudopotential Required
Download Si.UPF pseudopotential from the Quantum ESPRESSO pseudopotential library or copy from the installation:
cp /mnt/netapp_home/apps/quantum-espresso/qe-7.5/pseudo/Si_r.upf ./Si.UPF
CPU Job Script
qe_cpu.sh
CPU pw.x job
#!/bin/bash
#SBATCH --job-name=QE_CPU
#SBATCH --partition=CPU
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --output=qe_cpu_%j.out
module load qe/7.5-cpu
srun pw.x -input si.scf.in
GPU Job Script
qe_gpu.sh
GPU pw.x job
#!/bin/bash
#SBATCH --job-name=QE_GPU
#SBATCH --partition=GPU
#SBATCH --gres=gpu:1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --output=qe_gpu_%j.out
module load nvhpc/24.11
module load qe/7.5-gpu
srun pw.x -input si.scf.in
Checking Job Completion
Successful termination
grep "JOB DONE" qe_cpu_*.out
Expected output:
Example: Phonon Calculation (ph.x)
si.phon.in
Silicon phonon at Gamma point
phonons of Si at Gamma
&inputph
tr2_ph = 1.0d-12
prefix = 'silicon'
fildyn = 'si.dyn'
outdir = './tmp'
/
0.0 0.0 0.0
CPU Phonon Job
qe_ph_cpu.sh
CPU phonon job
#!/bin/bash
#SBATCH --job-name=QE_ph_CPU
#SBATCH --partition=CPU
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --output=qe_ph_cpu_%j.out
module load qe/7.5-cpu
srun pw.x -input si.scf.in
srun ph.x -input si.phon.in
GPU Phonon Job
qe_ph_gpu.sh
GPU phonon job
#!/bin/bash
#SBATCH --job-name=QE_ph_GPU
#SBATCH --partition=GPU
#SBATCH --gres=gpu:1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --output=qe_ph_gpu_%j.out
module load nvhpc/24.11
module load qe/7.5-gpu
srun pw.x -input si.scf.in
srun ph.x -input si.phon.in
Output Files
| File |
Description |
*.out |
Main output with calculation results |
./tmp/<prefix>.save/ |
Wavefunction and charge density data |
*.dyn |
Dynamical matrix (from ph.x) |
Multi-GPU Execution
4 GPU example
#!/bin/bash
#SBATCH --job-name=QE_multi_GPU
#SBATCH --partition=GPU
#SBATCH --gres=gpu:4
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=16
#SBATCH --output=qe_multi_gpu_%j.out
module load nvhpc/24.11
module load qe/7.5-gpu
srun pw.x -input si.scf.in
GPU Mapping
Quantum ESPRESSO uses 1 MPI process per GPU. For 4 GPUs, use --ntasks=4 and --gres=gpu:4.
Common Quantum ESPRESSO Executables
| Executable |
Description |
pw.x |
Plane-wave self-consistent field calculations |
ph.x |
Phonon calculations |
pp.x |
Post-processing (charge density, band structure) |
dos.x |
Density of states |
bands.x |
Band structure post-processing |
cp.x |
Car-Parrinello molecular dynamics |