Vasp - 5.4.4 Installation

I'll assume you want installation instructions and a feature-preparation checklist for VASP 5.4.4 (Vienna Ab initio Simulation Package). I'll provide (1) concise build/install steps for a typical Linux cluster (dependencies, compile options, example Makefile targets), and (2) a short "prepare a feature" checklist for developing/adding a feature in the VASP source (coding, testing, compilation, validation). If this assumption is wrong, tell me what OS/cluster and compiler/MPI/BLAS/LAPACK you use.

1.3 Essential Libraries

VASP requires:

  • MPI (Message Passing Interface) for parallel execution. Intel MPI, OpenMPI, or MPICH.
  • BLAS and LAPACK – Basic linear algebra routines.
  • FFTW (Fastest Fourier Transform in the West) – version 3.x.
  • scaLAPACK – For parallel linear algebra (optional but recommended).

3.2 GNU (gfortran) + OpenMPI + OpenBLAS + FFTW

For users without Intel licenses or on ARM-based systems.

First, install dependencies:

sudo apt install libopenblas-dev libfftw3-dev libscalapack-openmpi-dev

Then set makefile.include:

CPP_OPTIONS = -DHOST=\"LinuxGNU\" -DMPI -Duse_collective -DMPI_BLOCK=8000 \
              -DscaLAPACK -DCACHE_SIZE=4000 -Davoidalloc -Duse_bse_te \
              -Dtbdyn -Dfock_dblbuf

FC = mpif90 FCL = mpif90 CC = mpicc CXX = mpicxx

FFLAGS = -O2 -ffree-line-length-none -fopenmp -fallow-argument-mismatch OFLAG = -O2 DEBUG = -O0 -g -fbounds-check vasp 5.4.4 installation

LLIBS = -lopenblas -lfftw3 -lscalapack -lmpi

7.4 Linking Against CUDA-Aware MPI (for GPU builds)

Add -DMPI_BLOCK=131072 for better GPU-MPI performance. Use NCCL (NVIDIA Collective Communications Library) by adding -DUSENCCL.


Error 3: undefined reference to mkl_*

Cause: MKL linking order incorrect.
Solution: Link sequential MKL libraries in the right order:
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm I'll assume you want installation instructions and a

Beyond the Build: Optimization and Validation

  • CPU affinity: VASP is sensitive to thread placement. Use mpirun -bind-to core -map-by core (OpenMPI) or I_MPI_PIN_PROCESSOR_LIST (Intel MPI).
  • Scaling test: Run on 1, 2, 4, 8, 16 cores. Speedup should be nearly linear up to ~32 cores for a 100-atom system.
  • Verification: Compare forces and energies from your build against a reference (e.g., VASP wiki benchmarks). A difference of 1e-6 eV is fine; 1e-3 eV indicates wrong libraries (e.g., single-precision BLAS).

Step 3: Handling Common Pitfalls

Pitfall 1: FFTW vs. MKL
VASP 5.4.4 can use internal FFT, FFTW, or MKL. MKL is fastest. Ensure FFT3D = -DMKL_FFT and FFTLIB points to MKL, not FFTW.

Pitfall 2: Preprocessor Hell
The fpp that ships with Intel is picky. If you see error #5082: Syntax error, your preprocessor is choking on ! comments inside continued lines. Switch to CPP = gfortran -E -P -C as a workaround.

Pitfall 3: The "forrtl: severe (174): SIGSEGV" crash
This is usually a stack overflow. Add -heap-arrays 0 to FFLAGS and increase stack limit: ulimit -s unlimited. MPI (Message Passing Interface) for parallel execution

error: