Quantum ESPRESSO / Install errors

Quantum ESPRESSO install and runtime errors: causes and fixes

Common Quantum ESPRESSO (QE) errors during compiling, parallel runs and pseudopotential reading, listed by exact message, each with its cause and fix.

Short answer

QE needs the compiler, MPI and math libraries to come from one toolchain, and any piece from elsewhere breaks the build or the run.

Setting up your environment this way avoids most errors on this page.

PracticeWhat happens if you skip it
Use the prebuilt conda-forge QE whenever you can instead of compiling.Compiling means matching the compiler, MPI, BLAS, LAPACK and FFTW yourself, and any mismatch causes errors or slow runs.
If you must compile, take the compiler, MPI and math libraries from one source, such as one conda environment or one set of cluster modules.Mixed sources cause symbol not found at link time, or configure quietly falls back to slower internal libraries.
Build and run on Linux rather than compiling with gfortran inside WSL.WSL with gfortran has a known segmentation fault problem.
Take all pseudopotentials from one set (SSSP or SG15) and download them with wget or curl.Mixing functionals gives inconsistent DFT, and incomplete browser downloads give PP file is empty or wrong.

Troubleshooting by error message

Find your exact error message; entries go from building to running to pseudopotentials and input. Each gives the cause, the fix, and what may come up after the fix.

using internal copy of FFTW

Cause: configure did not find FFTW3 and fell back to QE's slower internal copy.

Fix: Point FFTW_INCLUDE and FFT_LIBS to the FFTW3 headers and library, then rerun configure.

What may come next: After replacing one library, the others may also need to come from the same toolchain, or linking fails with symbol not found.

setting LAPACK to internal library

Cause: configure did not find an external LAPACK and used the internal copy.

Fix: Point LAPACK_LIBS to an external LAPACK that comes from the same toolchain as the compiler.

What may come next: After replacing one library, the others may also need to come from the same toolchain, or linking fails with symbol not found.

MPIF90 not found: using MPIF90 anyway

Cause: mpif90 is not on PATH but configure continues with that name, so no parallel build is produced.

Fix: Install the MPI Fortran wrapper, confirm it with which mpif90, clean old build files and rerun configure.

What may come next: The MPI version must match the compiler; a mismatched MPI shows up later as mpirun errors.

Parallel environment not detected (is this a parallel machine?).

Cause: configure found no usable MPI and built a serial version only.

Fix: Install MPI and its Fortran wrapper, rerun configure, and check this line is gone.

why is configure saying that I have no fortran compiler?

Cause: No Fortran compiler is installed, or it is not on PATH.

Fix: Install gfortran and confirm it is on PATH with which gfortran.

What may come next: Once the compiler is found, missing BLAS, LAPACK or FFTW messages often follow.

why is configure saying that my fortran compiler doesn't work?

Cause: configure tried to compile a small test program with the compiler and failed.

Fix: Compile a minimal Fortran program yourself to confirm the compiler works.

symbol … not found

Cause: BLAS, LAPACK, FFT or MPI libraries come from different toolchains, so function names do not match.

Fix: Use a compiler, MPI and math libraries from one toolchain, clean, and rebuild.

What may come next: Other programs built with the old toolchain may stop running after you switch.

Error in routine readpp ... file ... not found

Cause: No file exists at the path built from pseudo_dir and the pseudopotential name, usually a wrong path or different letter case.

Fix: Write pseudo_dir as an absolute path and check the file name with ls, matching case exactly.

file ... not readable

Cause: The pseudopotential file exists but the current user cannot read it.

Fix: Check permissions with ls -l and grant the current user read access.

PP file is empty or wrong

Cause: The pseudopotential file is empty or in the wrong format, often from an incomplete web download.

Fix: Download it again with wget or curl, then check the file size and first lines.

inconsistent DFT read from PP files

Cause: The pseudopotentials use different exchange-correlation functionals.

Fix: Switch all pseudopotentials to the same functional, for example all PBE.

species X in ATOMIC_POSITIONS is nonexistent

Cause: An element label in ATOMIC_POSITIONS is not defined in ATOMIC_SPECIES.

Fix: Make the labels match exactly in both places, including case.

wrong number of columns in ATOMIC_POSITIONS

Cause: A line in ATOMIC_POSITIONS has the wrong number of columns for the chosen format.

Fix: Write each line as an element plus three coordinates and check the unit option after ATOMIC_POSITIONS.

S matrix not positive definite

Cause: The overlap matrix is not positive definite during diagonalization, often due to atoms too close together or unsuitable pseudopotentials or cutoffs.

Fix: Check for atoms that are too close, then the pseudopotentials and cutoffs, then retry with a different number of MPI processes.

problems computing cholesky

Cause: Diagonalization failed; this is the same kind of problem as S matrix not positive definite.

Fix: Follow the steps in the previous entry and retry with fewer MPI processes.

Primary job terminated normally, but 1 process returned a non-zero exit code..

Cause: One MPI process exited with an error, so mpirun stopped the whole job; this line is only the result.

Fix: Search the output from the top for the first real error, such as a segfault or a missing shared library, and fix that.

Screenshot of the OpenMPI Primary job terminated normally message
Source: Open MPI GitHub issue #3380. mpirun prints this message when one process exits with a non-zero code.
mpirun has detected an attempt to run as root

Cause: OpenMPI refuses to run as root by default.

Fix: Run as a normal user; add --allow-run-as-root only when you really need it, for example in a container.

Segmentation fault (QE compiled or run with gfortran under WSL)

Cause: A known problem with WSL and gfortran, described on a dedicated QE wiki page.

Fix: Adjust the compiler version and options following the QE wiki page Segfault with gfortran and WSL, or build on a Linux system instead.

What may come next: After changing the compiler version, MPI and the math libraries must be rebuilt with the same compiler.

No error, but the calculation is clearly slower than expected

Cause: OpenMP threads times MPI processes exceeds the CPU cores, so they compete for cores.

Fix: For pure MPI runs set export OMP_NUM_THREADS=1, or keep processes times threads within the core count.

Scientify is a cloud computer with research software installed and AI agents such as Codex and Claude Code built in. Describe what you need in one sentence, for example "compute the band structure and density of states of this crystal with PBE", and the agent uses the preinstalled Quantum ESPRESSO to do the modeling and computation, with no software to install and no code to write.

Compared with installing more on your own computer, the cloud computer already has QE 7.5 built with OpenMPI and the SSSP and SG15 pseudopotential sets stored locally, and runs continue after you close your laptop.

The cloud computer comes with more computing power: CPU and GPU clusters can be called on demand for large-scale scientific computing. Compute is billed by the minutes you actually use, so nothing is wasted.

Cloud computer
4 vCPU · 8 GB
Top configuration, for data processing and small to medium jobs
Callable GPU
96 GB VRAM
Up to an RTX PRO 6000 per GPU; H800 80 GB and up to 8 × A10G also available
Callable CPU
224 cores · 3 TB
Largest spec, for large parallel computations

Sources

Frequently asked questions

Can QE be installed with conda?

Yes. conda install -c conda-forge qe installs a prebuilt QE together with matching MPI and math libraries, but you still download pseudopotentials yourself.

Can QE run on Windows?

It has to be built and run inside WSL2 (the Linux subsystem built into Windows), and the gfortran segfault under WSL needs attention.

Where do I get pseudopotentials?

SSSP and SG15 are the common sets, from Materials Cloud and quantum-simulation.org; all pseudopotentials should use the same functional.

Run DFT with QE without compiling anything

Upload your data, describe the computation, and Scientify runs it on a cloud computer that is already set up. New accounts get a free cloud computer and US$5 in credit.