Requests for technical support from the VASP group should be posted in the VASP-forum.
For the compilation of VASP one needs:
- Compilers for Fortran (at least F2008 compliant), C, and C++. For instance, one of the following compiler suites:
Mind: For the OpenACC GPU port of VASP (to run on GPUs) on must use the compilers from the NVIDIA HPC-SDK (>=21.2).
- Numerical libraries: FFTW, BLAS, LAPACK, and ScaLAPACK. For instance, one of the following:
- - intel-oneapi-mkl
- - FFTW + OpenBLAS + ScaLAPACK
- - NVIDIA HPC-SDK (comes with OpenBLAS and ScaLAPACK) + FFTW
- - AOCL (for AMD CPUs)
- An implementation of the Message Passing Interface (MPI). For instance, one of the following:
To find a combination of compilers and libraries that works, have a look at our list of validated toolchains. On a personal computer, i.e., your desktop machine or laptop, you may use these validated instructions.
Step 1: Download
- Download the source code of VASP from the VASP Portal, copy it to the desired location on your machine, and unzip the file to obtain the folder
/path/to/vasp.x.x.xand reveal its content.
Step 2: Prepare makefile.include
- Create a makefile.include starting from a template in
/path/to/vasp.x.x.x/archthat resembles your system:
cp arch/makefile.include.your_choice ./makefile.include
- Adapt your makefile.include file to your system and select optional features.
Step 3: Make
- Build VASP with
make DEPS=1 -jN <target>
DEPS=1 -jNis optional and selects the parallel mode of make with
Nbeing the number of jobs you want to run, and
all. This builds the standard, gamma-only, non-collinear or all versions of VASP. The executables are
vasp_ncl, respectively, which are located at
Step 4: Test
Warning: VASP.6.1.0, VASP.6.1.1, and VASP.6.1.2 have a potentially serious issue related to the test suite. Please read about it here.
- Run the test suite with
- to confirm the build was successful.
Tip: If there are issues, the VASP Forum [installation issues] is the appropriate place to seek support.
Step 5: Install
- Copy the executables to the system
/path/to/vasp.x.x.x/bin/to the environment variable with
- for instance in your
Subdirectories in vasp.6.x.x
The build system of VASP (as of versions >= 5.4.1) comprises the following subdirectories:
vasp.x.x.x (root directory) | ------------------------------------------------ | | | | | | arch bin build src testsuite tools | ------------- | | | lib parser fftlib
- Holds the high-level makefile and several subdirectories.
- Holds the source files of VASP and a low-level makefile.
- Holds the source of the VASP library (used to be vasp.X.lib) and a low-level makefile.
- Holds the source of the LOCPROJ parser (as of versions >= 5.4.4) and a low-level makefile.
- Holds the source of the fftlib library that may be used to cache fftw plans.
- Holds a collection of makefile.include.* files.
- The different versions of VASP, i.e., the standard, gamma-only, non-collinear versions will be built in separate subdirectories of this directory.
- Here make will store the executables.
- Holds a suite of correctness tests to check your build.
- Holds several python scripts related to the use of HDF5 input/output files.