Osman Goni Ridwan

VASP cheat sheet · Essentials

VASP errors and fixes

Each common VASP error and warning with its cause and fix, labelled by whose advice it is, plus what to try when the SCF, a relaxation or a magnetic moment will not behave. Paste a message to find its entry.

Checked against VASP 6.6.1 · Updated

The short version

  1. Look in the right place: error boxes are in the standard output (vasp.out), crashes and out-of-memory kills in the Slurm .err file, SCF progress in OSZICAR.
  2. Check the basics first: is the structure sane (no atoms on top of each other), does the POTCAR order match POSCAR, does a known issue of your VASP version apply?
  3. Most crashes during a run trace back to an unconverged SCF or a bad geometry. Fix the SCF before anything else.
  4. Restart only from files that match the run: a WAVECAR with different k-points or bands, or files from a different structure, cause several of the errors below.
  5. Never “fix” symmetry errors with a huge SYMPREC: it silently over-symmetrizes the result.
Where to look
grep -n -E "I REFUSE TO CONTINUE|VERY BAD NEWS|internal error|ERROR" vasp.out   # error boxes
grep -c "W    W    AA    RRRRR" vasp.out OUTCAR                                    # warning boxes
tail -20 *.err                          # crashes, out-of-memory kills, time limit (Slurm)
grep " F= " OSZICAR | tail -3           # last ionic steps: energy and magnetic moment
head -1 OUTCAR                          # VASP version

Look up an error

Paste the message from your output, or type a word from it, and jump to its entry.

Labels: VASP advice printed by VASP or given in its documentation and by its developers; Rule of thumb common practice; custodian what the custodian error handler (used by Materials Project workflows) does automatically.

Check your version first

ProblemVersionsWhat to do
Wrong forces in spin-polarized meta-GGA (r²SCAN, SCAN) runs6.6.0 onlyUse 6.6.1. Relaxations, NEB, MD and force-field training done with 6.6.0 are suspect.
Default NBANDS too small with negative MAGMOM values; misleading crashesup to 6.5.xSet NBANDS by hand, or use 6.6.0 or later.
KPAR > 1 runs hang in the SCF6.1 and later; partly fixed in 6.6.0Use KPAR = 1 if a job stalls.
DFT+U with OpenMP threads hangs or crashesopen issueRun DFT+U with OMP_NUM_THREADS=1.
ALGO = All from random orbitals stops with “the gradient is not orthogonal”6.1 and laterConverge with ALGO = Normal first, then restart with ALGO = All from that WAVECAR.
Hybrids with ALGO = Normal crash at random on NVIDIA GPUs6.6.0 and later (not fixed in 6.6.1)Use ALGO = Damped.

VASP's Known issues page on its Wiki lists the rest; head -1 OUTCAR shows the version that ran.

Error messages

ZBRENT: fatal error in bracketing

The conjugate-gradient relaxation (IBRION = 2) could not find a sensible next step along its line search. Usually the structure is already close to the minimum, or the forces are noisy because the SCF was not tight enough.

  • VASP advice Copy CONTCAR to POSCAR and continue, or tighten EDIFF (e.g. 1E-6 or smaller).
  • VASP advice Make sure every ionic step's SCF converged; then try a smaller POTIM or IBRION = 1.
  • VASP advice VASP 6.6.0 fixed a bug in how this line search chose its bracketing interval, so upgrading can help when ZBRENT keeps appearing.
  • custodian Copies CONTCAR, sets EDIFF = 1E-6 and NELMIN = 8; on a second hit switches to IBRION = 1.

Error EDDDAV: Call to ZHEGV failed

The Davidson diagonalization broke down. Frequent causes: two atoms got too close, or the SCF was not converging.

  • VASP advice Check the geometry (duplicate or overlapping atoms) and change ALGO: All (with a small TIME such as 0.05), or Fast, or a larger smearing.
  • VASP advice Strip the INCAR to a minimal one to find the setting that triggers it.
  • custodian Copies CONTCAR, deletes CHGCAR, switches to ALGO = All with ISEARCH = 1.

WARNING in EDDRMM: call to ZHEGV failed

A warning, not an error: RMM-DIIS (ALGO = Fast or VeryFast) had trouble updating one band.

  • VASP advice Switch to ALGO = Normal; if you keep VeryFast, use a larger NELMDL. Check the geometry and POTIM.
  • custodian Sets ALGO = Normal (or halves POTIM) and deletes CHGCAR and WAVECAR.

BRMIX: very serious problems the old and the new charge density differ

The Broyden density mixer received inconsistent densities. Common causes: the Fermi level could not be determined (change the smearing), too few bands, a stray NELECT, or a restart from a WAVECAR made with a different k-mesh.

  • VASP advice Change the smearing method; reduce the mixing (AMIX, BMIX); or use ALGO = All with a smaller TIME. After a WAVECAR restart with a different mesh it is usually safe to ignore if the SCF then converges.
  • Rule of thumb ISYM = 0, or move one atom slightly.
  • custodian Restarts with ISTART = 1, then Kerker mixing (IMIX = 1), then swaps Gamma and Monkhorst–Pack meshes, then ISYM = 0.

WARNING: Sub-Space-Matrix is not hermitian in DAV

A pathological geometry or density, or a WAVECAR inconsistent with the current run (different FFT grid, cell, k-mesh or NBANDS).

  • VASP advice ALGO = All is usually the most reliable fix. Delete a mismatched WAVECAR; lower POTIM in relaxations.
  • custodian Sets LREAL = .FALSE., then PREC = Accurate.

Your highest band is occupied at some k-points! … TOO FEW BANDS

VASP needs every occupied state plus at least one empty band. The default NBANDS can be too small for f-electron systems, meta-GGA, and (before 6.6.0) negative starting moments.

  • VASP advice Raise NBANDS; set MAGMOM explicitly.
  • custodian Raises NBANDS by 10% (at least one band).

The number of bands has been changed from the values supplied in the INCAR file

Not an error: VASP rounds NBANDS up so that it divides evenly over the cores. The results can then differ slightly between runs on different core counts.

  • VASP advice Run every step of a study on the same number of cores.

VERY BAD NEWS! internal error in subroutine PRICEL

Symmetry detection failed, usually because the POSCAR has too few digits or a supercell was built from imprecise coordinates. A variant reads “PRICELV: current lattice and primitive lattice are incommensurate within SYMPREC”.

  • VASP advice Write coordinates with at least 7 significant digits; rebuild the supercell from a precise primitive cell; try changing SYMPREC by a factor of 10.
  • custodian Sets SYMPREC = 1E-8 and ISYM = 0.

VERY BAD NEWS! internal error in subroutine SGRCON: Found some non-integer element in rotation matrix

Imprecise symmetry, often together with the IBZKPT message below.

  • VASP advice A tighter SYMPREC (e.g. 1E-6); check the POSCAR and whether MAGMOM breaks the symmetry; use a Γ-centred mesh, or ISYM = 0.
  • custodian Switches a Monkhorst–Pack mesh to Γ-centred, otherwise sets ISYM = 0.

Inconsistent Bravais lattice types found for crystalline and reciprocal lattice

The lattice vectors are not precise enough for VASP to classify them consistently.

  • VASP advice Refine the lattice parameters, and/or change SYMPREC. Check that SYMPREC is really read: a tab at the start of the line has made VASP ignore it.
  • custodian Lowers SYMPREC to at most 1E-6, then sets ISYM = 0.

VERY BAD NEWS! internal error in subroutine IBZKPT: Reciprocal lattice and k-lattice belong to different class of lattices

The k-mesh does not fit the symmetry of the lattice. VASP's developers describe it as a warning more than an error: results are often still usable, and newer versions simply continue.

  • VASP advice Use a mesh that fits the lattice: Γ-centred for fcc and hexagonal cells, no even in-plane Monkhorst–Pack mesh for hexagonal ones. Otherwise ISYM = 0 or a tighter SYMPREC.
  • custodian Only if the run did not converge: Monkhorst–Pack to Γ-centred, otherwise ISYM = 0.

LAPACK: Routine ZPOTRF failed

The overlap matrix of the orbitals is no longer invertible. VASP 6.3 and later print it as “Orbital orthonormalization failed in the inversion of matrix”. Usually atoms came too close, often after an unconverged SCF gave bad forces.

  • VASP advice Check for atoms too close together; decrease POTIM; delete an incompatible CHGCAR or WAVECAR; try ISYM = 0; or LREAL = .FALSE., PREC = Accurate and a different ALGO.
  • custodian Sets ISYM = 0; for very small cells NCORE = 1; otherwise halves POTIM.

ERROR in subspace rotation PSSYEVX: not enough eigenvalues found

The parallel diagonalization failed (VASP 6 prints PDSYEVX or PZHEEVX). Mostly an input problem: a wrong POTCAR, or ISPIN = 2 without a sensible MAGMOM.

  • VASP advice Check the input files first.
  • custodian Sets ALGO = Normal.

internal ERROR RSPHER: running out of buffer

The real-space projectors (LREAL) ran out of room after a large change of geometry, or with a mismatched WAVECAR.

  • VASP advice Restart from the last CONTCAR; drop a mismatched WAVECAR.
  • Rule of thumb LREAL = .FALSE. (custodian does the same).

REAL_OPTLAY: internal error (1)

The real-space projector layout failed, typically after an unconverged SCF let the structure change drastically.

  • VASP advice Fix the SCF first (ALGO = Normal, no unusual mixing settings).
  • Rule of thumb LREAL = .FALSE. (custodian does the same).

POSMAP internal error: symmetry equivalent atom not found

The symmetry tolerance does not match the precision of the positions.

  • VASP advice Change SYMPREC by a factor of 10 (the message suggests it). Do not go as far as 1E-2, and compare with ISYM = −1 if in doubt.
  • custodian SYMPREC ÷ 10, then × 100, then ISYM = 0.

The distance between some ions is very small. Please check the nearest-neighbor list in the OUTCAR file.

Duplicated atoms, an atom overlapping its periodic image, or Cartesian coordinates read as Direct.

  • VASP advice Read the nearest-neighbour table in OUTCAR (a dry run prints it in seconds) and look at the structure. The POSCAR checker reports the shortest distance.

The electronic self-consistency was not achieved in the given number of steps (NELM)

The SCF hit NELM without converging; forces and everything else from that step are unreliable, and an unconverged SCF can ruin a relaxation.

  • VASP advice Do not just raise NELM: an SCF that has not converged in about 40 steps usually will not. Follow the SCF ladder below.

EDWAV: internal error, the gradient is not orthogonal

Seen with ALGO = All started from random orbitals (a known issue since 6.1), and with meta-GGA restarts without TAUCAR.

  • VASP advice Converge with ALGO = Normal first, then restart with ALGO = All from that WAVECAR.

Tetrahedron method fails (BZINTS, DENTET)

The tetrahedron method (ISMEAR = −5) needs a Γ-centred mesh with enough k-points.

  • VASP advice Use a Γ-centred mesh with at least 4 k-points, or switch to ISMEAR = 0 ; SIGMA = 0.05.

ERROR: the triple product of the basis vectors …

The three lattice vectors are badly defined, most often a left-handed set (negative triple product).

  • Rule of thumb Swap two lattice vectors (and the matching fractional coordinates); custodian does this automatically.

The job died

SIGSEGV, segmentation fault occurred or BAD TERMINATION … EXIT CODE: 11

Most often the stack is too small: VASP keeps large arrays on it, and the default limit is a few megabytes. Also seen when mpirun comes from a different MPI than the one VASP was built with (the log then shows one rank with many threads).

  • VASP advice ulimit -s unlimited in the job script, and OMP_STACKSIZE=512m with OpenMP. Load the MPI module VASP was built with.

oom-kill event / Out Of Memory in the Slurm .err file

The run needed more memory than the job had.

  • VASP advice Lower KPAR (each k-point group holds its own copy), use NCORE of 4 or more and LREAL = Auto, or use more nodes with fewer ranks per node.

M_divide: can not subdivide … nodes by …

KPAR, NCORE or NPAR do not fit the number of MPI ranks.

  • VASP advice KPAR must divide the ranks (ideally also the number of k-points); set NCORE or NPAR, never both. See the Slurm sheet.

Killed at the time limit (sacct State TIMEOUT)

No final timing block in OUTCAR; WAVECAR may be incomplete.

  • VASP advice Restart from CONTCAR. Next time, write a STOPCAR before the limit with a Slurm signal (see the Slurm sheet).

The SCF will not converge

Signs: OSZICAR runs to NELM steps, dE oscillates, rms(c) does not fall. Work down this list, one change at a time.

  1. Simplify. Start from a minimal INCAR with fewer k-points and a lower cutoff, and add tags back one at a time until the problem returns. VASP advice
  2. Smearing. With partly occupied states use ISMEAR = 1 or −1 and a larger SIGMA; a gapped system with ISMEAR > 0 can misbehave. VASP advice
  3. Bands. Raise NBANDS, especially for f electrons and meta-GGA; the highest bands must be empty. VASP advice
  4. Algorithm. Try ALGO = All with ISEARCH = 1 (VASP 6.5.1 and later): the recommended choice for magnetic, DFT+U, meta-GGA and hybrid runs. VASP advice
  5. Delay. A non-self-consistent start (NELMDL, negative) helps surfaces and metal clusters. VASP advice
  6. Mixing. For slabs, magnetic and insulating systems, nearly linear mixing: AMIX = 0.2 ; BMIX = 0.0001 ; AMIX_MAG = 0.8 ; BMIX_MAG = 0.0001 (not exactly 0, which crashes some versions). Metals may need AMIX as small as 0.02. VASP advice

Magnetic systems

  • Converge a non-magnetic density first, then restart from it with ISPIN = 2 and your MAGMOM (ICHARG = 1).
  • Linear mixing (above), smaller AMIX and AMIX_MAG, a smaller |MAXMIX|.
  • Restart from a partly converged WAVECAR; constrain the moments if needed.

DFT+U magnets, in three runs

  1. ICHARG = 12 with ALGO = Normal and no U.
  2. ALGO = All with TIME = 0.05 (VASP's documentation calls this crucial).
  3. Add the U tags. Restart each run from the previous WAVECAR.

For r²SCAN, converge with PBE first and start from its WAVECAR, with ALGO = All and LASPH = .TRUE.

TagWhat it doesDefaultWhat to useWatch out
AMIXLinear mixing parameter for the charge density.0.4 (PAW)Lower it if the SCF oscillates.
BMIXCutoff wave vector of the Kerker mixing for the charge density.1.0A tiny value (0.0001) makes the mixing nearly linear, a step in the magnetic troubleshooting recipe.
AMIX_MAGMixing parameter for the magnetization density.1.6Lower it, together with BMIX_MAG, when a magnetic SCF will not settle.
BMIX_MAGKerker cutoff for the magnetization density.1.00.0001 for nearly linear mixing in hard magnetic cases.
MAXMIXHow many previous steps the Broyden mixer keeps.−45A positive value keeps the mixer history across ionic steps, which can save SCF steps in relaxations and MD. In hard magnetic cases, a smaller |MAXMIX| can help.Negative (the default) resets the mixer at every ionic step.

The relaxation will not finish

  • Follow the largest force and the energy per ionic step (commands on the output sheet). Steps that go up and down mean the step size or the forces are the problem.
  • Make the forces accurate: tighter EDIFF (1E-6 or below) and NELMIN = 4 to 8. VASP advice
  • Change the optimizer: IBRION = 2 (conjugate gradient) is the robust default far from the minimum; IBRION = 1 is faster close to it but needs accurate forces; IBRION = 3 needs a sensible POTIM. VASP advice
  • For cell relaxations use ENCUT ≥ 1.3 × ENMAX and restart from CONTCAR until the cell stops changing.
  • If the forces jump between steps, halve POTIM. Rule of thumb

The magnetic moment collapses

  • Start the moments 1.2–1.5 × above the expected values; the final state depends on the start. VASP advice
  • Keep MAGMOM in the INCAR when restarting from WAVECAR or CHGCAR: without it the magnetization can be symmetrized away. VASP advice
  • An antiferromagnet needs its opposite signs in MAGMOM and a cell that holds both sublattices.
  • Use the magnetic mixing above, or fix the total moment with NUPDOWN to reach a state, then release it.
  • Follow mag= per ionic step: grep -o "mag= *[-0-9.E+]*" OSZICAR.

The physics behind this sheet

  • Lecture 12: Self-consistent field convergence (in preparation)

Further reading

  1. VASP Wiki, “Troubleshooting electronic convergence” (the official ladder, magnetic and DFT+U recipes). · www.vasp.at
  2. VASP Wiki, “Known issues” (bugs by version, with workarounds). · www.vasp.at
  3. The VASP forum, where the developers answer questions on errors. · www.vasp.at