Updated 2023-03-31
Run Quantum ESPRESSO on the Cluster¶
Overview¶
- 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.
- This guide will cover how to run Quantum ESPRESSO on the Cluster.
Summary¶
- To run Quantum ESPRESSO, you need an input file and a pseudopotential.
- You will run a PWscf (pw.x) calculation on the input file to produce an output file containing the results of the calculation.
Tips¶
- You can run the calculation with multiple processors. Make sure to request the proper number of processors in your SBATCH script if you do this.
Walkthrough: Run AMPL on the Cluster¶
- This walkthrough will run a PWscf (pw.x) calculation on an input file which contains a reference to a pseudopotential.
- The
input.in
file can be found here - The
Al.pz-n-rrkjus_psl.0.1.UPF
file can be found here. For everything to work properly, a directory should be created calledpseudopotential
and this file should be saved inside of that directory. SBATCH
script can be found here- You can transfer the files to your account on the cluster to follow along. The file transfer guide may be helpful.
Part 1: The SBATCH Script¶
#!/bin/bash
#SBATCH -JqespressoTest
#SBATCH -A [Account]
#SBATCH -N1 --ntasks-per-node=2
#SBATCH --mem-per-cpu=2G
#SBATCH -t3
#SBATCH -qinferno
#SBATCH -oReport-%j.out
cd $SLURM_SUBMIT_DIR
module load gcc/10.3.0
module load mvapich2/2.3.6
module load quantum-espresso/7.0
srun pw.x -input input.in output.out
- The
#SBATCH
directives are standard, requesting just 3 minutes of walltime and 1 node with 2 cores. More on#SBATCH
directives can be found in the Using Slurm on Phoenix Guide $SLURM_SUBMIT_DIR
is a variable that represents the directory you submit the SBATCH script from. Make sure the files you want to use are in the same directory you put the SBATCH script.- Output Files will also show up in this dir as well
module load quantum-espresso/7.0
loads the 7.0 version of Quantum ESPRESSO. To see what Quantum ESPRESSO versions are available, runmodule avail quantum-espresso
, and load the one you want. The other module are dependencies that must be loaded before Quantum ESPRESSO is loaded.srun pw.x <input.in> output.out
runs a PWscf calculation on theinput.in
file and prints the results to theoutput.out
file.
Part 2: Submit Job and Check Status¶
- Be sure to change to the directory that contains the
SBATCH
Script as well as theinput.in
file and thepseudopotential
folder. - Submit as normal, with
sbatch < script name>
. In this casesbatch quantum-espresso.sbatch
- Check job status with
squeue --job <jobID>
, replacing with the jobid returned after running sbatch - You can delete the job with
scancel <jobID>
, replacing with the jobid returned after running sbatch
Part 3: Collecting Results¶
- In the directory where you submitted the
SBATCH
script, you should see aReport-<jobID>.out
file which contains the results of the job, anoutput.out
file which contains the output from Quantum ESPRESSO, a directory calledpwscf.save
, and apwscf.xml
file. - Use
cat Report-<jobID>.out
or open the file in a text editor to take a look at the ouput messages from running the SBATCH script.Report-<jobID>.out
should look like this:
---------------------------------------
Begin Slurm Prolog: Jan-22-2023 17:01:15
Job ID: 563249
User ID: svangala3
Account: phx-pace-staff
Job name: qespressoTest
Partition: cpu-small
QOS: inferno
---------------------------------------
Program PWSCF v.7.0 starts on 22Jan2023 at 17: 1:17
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 2 processors
MPI processes distributed on 1 nodes
R & G space division: proc/nbgrp/npool/nimage = 2
329203 MiB available memory on the printing compute node when the environment starts
Reading input from input.in
Current dimensions of program PWSCF are:
Max number of different atomic species (ntypx) = 10
Max number of k-points (npk) = 40000
Max angular momentum in pseudopotentials (lmaxx) = 4
Subspace diagonalization in iterative solution of the eigenvalue problem:
a serial algorithm will be used
Parallelization info
--------------------
sticks: dense smooth PW G-vecs: dense smooth PW
Min 120 120 42 1221 1221 264
Max 121 121 43 1224 1224 267
Sum 241 241 85 2445 2445 531
Using Slab Decomposition
bravais-lattice index = 2
lattice parameter (alat) = 7.6526 a.u.
unit-cell volume = 112.0383 (a.u.)^3
number of atoms/cell = 1
number of atomic types = 1
number of electrons = 3.00
number of Kohn-Sham states= 6
kinetic-energy cutoff = 30.0000 Ry
charge density cutoff = 120.0000 Ry
scf convergence threshold = 1.0E-06
mixing beta = 0.7000
number of iterations used = 8 plain mixing
Exchange-correlation= LDA
( 1 1 0 0 0 0 0)
celldm(1)= 7.652597 celldm(2)= 0.000000 celldm(3)= 0.000000
celldm(4)= 0.000000 celldm(5)= 0.000000 celldm(6)= 0.000000
crystal axes: (cart. coord. in units of alat)
a(1) = ( -0.500000 0.000000 0.500000 )
a(2) = ( 0.000000 0.500000 0.500000 )
a(3) = ( -0.500000 0.500000 0.000000 )
reciprocal axes: (cart. coord. in units 2 pi/alat)
b(1) = ( -1.000000 -1.000000 1.000000 )
b(2) = ( 1.000000 1.000000 1.000000 )
b(3) = ( -1.000000 1.000000 -1.000000 )
PseudoPot. # 1 for Al read from file:
./pseudopotential/Al.pz-n-rrkjus_psl.0.1.UPF
MD5 check sum: 3b788946f5b2ec323a58a29a5ff2368a
Pseudo is Ultrasoft + core correction, Zval = 3.0
Generated using "atomic" code by A. Dal Corso v.5.0.2 svn rev. 9415
Using radial grid of 1135 points, 4 beta functions with:
l(1) = 0
l(2) = 0
l(3) = 1
l(4) = 1
Q(r) pseudized with 0 coefficients
atomic species valence mass pseudopotential
Al 3.00 26.98150 Al( 1.00)
48 Sym. Ops., with inversion, found
Cartesian axes
site n. atom positions (alat units)
1 Al tau( 1) = ( 0.0000000 0.0000000 0.0000000 )
number of k points= 29 Marzari-Vanderbilt smearing, width (Ry)= 0.0050
cart. coord. in units 2pi/alat
k( 1) = ( 0.0000000 0.0000000 0.0000000), wk = 0.0039062
k( 2) = ( -0.1250000 0.1250000 -0.1250000), wk = 0.0312500
k( 3) = ( -0.2500000 0.2500000 -0.2500000), wk = 0.0312500
k( 4) = ( -0.3750000 0.3750000 -0.3750000), wk = 0.0312500
k( 5) = ( 0.5000000 -0.5000000 0.5000000), wk = 0.0156250
k( 6) = ( 0.0000000 0.2500000 0.0000000), wk = 0.0234375
k( 7) = ( -0.1250000 0.3750000 -0.1250000), wk = 0.0937500
k( 8) = ( -0.2500000 0.5000000 -0.2500000), wk = 0.0937500
k( 9) = ( 0.6250000 -0.3750000 0.6250000), wk = 0.0937500
k( 10) = ( 0.5000000 -0.2500000 0.5000000), wk = 0.0937500
k( 11) = ( 0.3750000 -0.1250000 0.3750000), wk = 0.0937500
k( 12) = ( 0.2500000 0.0000000 0.2500000), wk = 0.0468750
k( 13) = ( 0.0000000 0.5000000 0.0000000), wk = 0.0234375
k( 14) = ( -0.1250000 0.6250000 -0.1250000), wk = 0.0937500
k( 15) = ( 0.7500000 -0.2500000 0.7500000), wk = 0.0937500
k( 16) = ( 0.6250000 -0.1250000 0.6250000), wk = 0.0937500
k( 17) = ( 0.5000000 0.0000000 0.5000000), wk = 0.0468750
k( 18) = ( 0.0000000 0.7500000 0.0000000), wk = 0.0234375
k( 19) = ( 0.8750000 -0.1250000 0.8750000), wk = 0.0937500
k( 20) = ( 0.7500000 0.0000000 0.7500000), wk = 0.0468750
k( 21) = ( 0.0000000 -1.0000000 0.0000000), wk = 0.0117188
k( 22) = ( -0.2500000 0.5000000 0.0000000), wk = 0.0937500
k( 23) = ( 0.6250000 -0.3750000 0.8750000), wk = 0.1875000
k( 24) = ( 0.5000000 -0.2500000 0.7500000), wk = 0.0937500
k( 25) = ( 0.7500000 -0.2500000 1.0000000), wk = 0.0937500
k( 26) = ( 0.6250000 -0.1250000 0.8750000), wk = 0.1875000
k( 27) = ( 0.5000000 0.0000000 0.7500000), wk = 0.0937500
k( 28) = ( -0.2500000 -1.0000000 0.0000000), wk = 0.0468750
k( 29) = ( -0.5000000 -1.0000000 0.0000000), wk = 0.0234375
Dense grid: 2445 G-vectors FFT dimensions: ( 20, 20, 20)
Estimated max dynamical RAM per process > 2.30 MB
Estimated total dynamical RAM > 4.60 MB
Check: negative core charge= -0.000006
Initial potential from superposition of free atoms
starting charge 2.9980, renormalised to 3.0000
Starting wfcs are 4 randomized atomic wfcs + 2 random wfcs
total cpu time spent up to now is 0.3 secs
per-process dynamical memory: 13.2 Mb
Self-consistent Calculation
iteration # 1 ecut= 30.00 Ry beta= 0.70
Davidson diagonalization with overlap
ethr = 1.00E-02, avg # of iterations = 5.9
Minimization algorithm failed to find Fermi energy: reverting to bisection
Possible cause: smearing is larger than the electronic band-gap.
Threshold (ethr) on eigenvalues was too large:
Diagonalizing with lowered threshold
Davidson diagonalization with overlap
ethr = 1.92E-04, avg # of iterations = 3.2
Minimization algorithm failed to find Fermi energy: reverting to bisection
Possible cause: smearing is larger than the electronic band-gap.
total cpu time spent up to now is 0.5 secs
total energy = -5.48852733 Ry
estimated scf accuracy < 0.00542218 Ry
iteration # 2 ecut= 30.00 Ry beta= 0.70
Davidson diagonalization with overlap
ethr = 1.81E-04, avg # of iterations = 1.3
total cpu time spent up to now is 0.6 secs
total energy = -5.48850237 Ry
estimated scf accuracy < 0.00035987 Ry
iteration # 3 ecut= 30.00 Ry beta= 0.70
Davidson diagonalization with overlap
ethr = 1.20E-05, avg # of iterations = 4.6
Minimization algorithm failed to find Fermi energy: reverting to bisection
Possible cause: smearing is larger than the electronic band-gap.
total cpu time spent up to now is 0.6 secs
End of self-consistent calculation
k = 0.0000 0.0000 0.0000 ( 331 PWs) bands (ev):
-3.4382 20.1765 20.1769 21.3995 21.3996 21.3996
k =-0.1250 0.1250-0.1250 ( 316 PWs) bands (ev):
-3.0167 15.8704 19.1644 19.1645 22.1883 22.9759
k =-0.2500 0.2500-0.2500 ( 311 PWs) bands (ev):
-1.7594 11.0367 18.3884 18.3885 21.8800 22.1866
k =-0.3750 0.3750-0.3750 ( 308 PWs) bands (ev):
0.3122 6.7618 18.2899 18.2899 20.2366 20.2367
k = 0.5000-0.5000 0.5000 ( 302 PWs) bands (ev):
3.0988 3.2354 18.7735 18.7735 19.0508 19.0510
k = 0.0000 0.2500 0.0000 ( 307 PWs) bands (ev):
-2.8764 17.4110 17.4111 17.7855 20.2798 22.1617
k =-0.1250 0.3750-0.1250 ( 308 PWs) bands (ev):
-1.8986 12.8876 16.3512 17.9177 19.0815 21.5771
k =-0.2500 0.5000-0.2500 ( 317 PWs) bands (ev):
-0.1000 8.4517 16.0037 16.7601 17.7228 23.6598
k = 0.6250-0.3750 0.6250 ( 312 PWs) bands (ev):
2.4880 4.6417 15.1374 16.3713 18.1659 22.1698
k = 0.5000-0.2500 0.5000 ( 308 PWs) bands (ev):
1.5409 5.8312 14.2599 17.4513 19.3409 21.3435
k = 0.3750-0.1250 0.3750 ( 309 PWs) bands (ev):
-0.7891 9.8460 14.1567 19.2123 21.2101 21.2189
k = 0.2500 0.0000 0.2500 ( 317 PWs) bands (ev):
-2.3169 14.0419 15.2073 21.2664 21.3463 22.8602
k = 0.0000 0.5000 0.0000 ( 311 PWs) bands (ev):
-1.2042 15.0349 15.0350 15.1389 15.8116 18.4238
k =-0.1250 0.6250-0.1250 ( 316 PWs) bands (ev):
0.3108 10.8313 13.1561 14.4410 15.9501 19.8594
k = 0.7500-0.2500 0.7500 ( 311 PWs) bands (ev):
2.6170 6.8753 11.2393 14.5658 16.2829 23.5054
k = 0.6250-0.1250 0.6250 ( 307 PWs) bands (ev):
3.5618 5.6615 10.1189 15.4090 17.2653 25.0687
k = 0.5000 0.0000 0.5000 ( 315 PWs) bands (ev):
0.9957 8.8771 10.3141 16.9685 18.9660 24.4931
k = 0.0000 0.7500 0.0000 ( 322 PWs) bands (ev):
1.5343 10.1874 13.4912 13.6031 13.6032 17.0123
k = 0.8750-0.1250 0.8750 ( 314 PWs) bands (ev):
3.5281 7.9905 9.8166 13.4856 14.8974 18.9319
k = 0.7500 0.0000 0.7500 ( 308 PWs) bands (ev):
5.7739 6.3003 7.1688 14.0871 15.7643 23.0999
k = 0.0000-1.0000 0.0000 ( 302 PWs) bands (ev):
4.7421 6.0085 12.9374 13.1264 13.1264 16.5104
k =-0.2500 0.5000 0.0000 ( 311 PWs) bands (ev):
-0.6511 11.4669 12.7993 16.2992 19.6855 21.3168
k = 0.6250-0.3750 0.8750 ( 313 PWs) bands (ev):
1.4035 7.7617 12.1519 14.1764 20.2650 22.3200
k = 0.5000-0.2500 0.7500 ( 308 PWs) bands (ev):
4.1386 4.3239 12.5936 12.9464 20.7467 21.2422
k = 0.7500-0.2500 1.0000 ( 309 PWs) bands (ev):
2.0767 9.9149 10.6283 11.3952 18.2031 20.0857
k = 0.6250-0.1250 0.8750 ( 308 PWs) bands (ev):
4.5907 6.7073 9.0603 11.1748 19.3465 23.3829
k = 0.5000 0.0000 0.7500 ( 311 PWs) bands (ev):
3.6913 7.3245 8.7318 12.2806 20.5357 23.7934
k =-0.2500-1.0000 0.0000 ( 308 PWs) bands (ev):
5.2578 6.5515 9.3969 10.8138 17.6969 19.6367
k =-0.5000-1.0000 0.0000 ( 308 PWs) bands (ev):
6.8074 6.8074 7.8494 8.5757 23.3238 23.3258
the Fermi energy is 7.7293 ev
! total energy = -5.48852574 Ry
estimated scf accuracy < 0.00000080 Ry
smearing contrib. (-TS) = -0.00010947 Ry
internal energy E=F+TS = -5.48841628 Ry
The total energy is F=E-TS. E is the sum of the following terms:
one-electron contribution = 2.92910697 Ry
hartree contribution = 0.00591156 Ry
xc contribution = -3.03130996 Ry
ewald contribution = -5.39212484 Ry
convergence has been achieved in 3 iterations
Writing all to output data dir ./pwscf.save/
init_run : 0.21s CPU 0.23s WALL ( 1 calls)
electrons : 0.26s CPU 0.32s WALL ( 1 calls)
Called by init_run:
wfcinit : 0.03s CPU 0.03s WALL ( 1 calls)
potinit : 0.00s CPU 0.00s WALL ( 1 calls)
hinit0 : 0.17s CPU 0.18s WALL ( 1 calls)
Called by electrons:
c_bands : 0.22s CPU 0.25s WALL ( 4 calls)
sum_band : 0.04s CPU 0.04s WALL ( 4 calls)
v_of_rho : 0.00s CPU 0.00s WALL ( 4 calls)
newd : 0.00s CPU 0.00s WALL ( 4 calls)
mix_rho : 0.00s CPU 0.00s WALL ( 4 calls)
Called by c_bands:
init_us_2 : 0.01s CPU 0.01s WALL ( 261 calls)
init_us_2:cp : 0.01s CPU 0.01s WALL ( 261 calls)
cegterg : 0.21s CPU 0.24s WALL ( 116 calls)
Called by *egterg:
cdiaghg : 0.03s CPU 0.03s WALL ( 521 calls)
h_psi : 0.17s CPU 0.19s WALL ( 579 calls)
s_psi : 0.00s CPU 0.00s WALL ( 579 calls)
g_psi : 0.00s CPU 0.00s WALL ( 434 calls)
Called by h_psi:
h_psi:calbec : 0.01s CPU 0.01s WALL ( 579 calls)
vloc_psi : 0.16s CPU 0.18s WALL ( 579 calls)
add_vuspsi : 0.00s CPU 0.00s WALL ( 579 calls)
General routines
calbec : 0.01s CPU 0.01s WALL ( 695 calls)
fft : 0.07s CPU 0.07s WALL ( 17 calls)
ffts : 0.00s CPU 0.00s WALL ( 4 calls)
fftw : 0.16s CPU 0.17s WALL ( 5244 calls)
Parallel routines
PWSCF : 0.53s CPU 0.76s WALL
This run was terminated on: 17: 1:18 22Jan2023
=------------------------------------------------------------------------------=
JOB DONE.
=------------------------------------------------------------------------------=
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
---------------------------------------
Begin Slurm Epilog: Jan-22-2023 17:01:18
Job ID: 563249
Array Job ID: _4294967294
User ID: svangala3
Account: phx-pace-staff
Job name: qespressoTest
Resources: cpu=2,mem=4G,node=1
Rsrc Used: cput=00:00:08,vmem=1168K,walltime=00:00:04,mem=0,energy_used=0
Partition: cpu-small
QOS: inferno
Nodes: atl1-1-01-004-26-2
---------------------------------------
- After the result files are produced, you can move the files off the cluster, refer to the file transfer for help.
- Congratulations! You successfully ran Quantum ESPRESSO on the cluster.