Vasp 5.4.4 Manual

Nov 21, 2017 vaspstd 5.4.4 Multiple k-point collinear calculations vaspncl 5.4.4 non-collinear calculations, spin-orbit coupling vaspgam 5.4.4 gamma-point only vaspgpu 5.4.4 GPU enabled port of standard VASP vaspgpuncl 5.4.4 GPU enabled port of non-collinear version Older VASP executables still in common use: vaspso 5.3.5. Features that will only be available in VASP.6.X. How to Install VASP: First install VASP. Workshops: The collection of workshops is a good place for the introduction to the basics of VASP. Lectures: The collection of lectures is a good place to start as well. Tutorials and Examples.

Requests for technical support from the VASP group should be posted in the VASP-forum.

  • 4Adapting makefile.include
    • 4.3Linking against libraries
    • 4.6Special rules
  • 6Patches

Requirements

For the compilation of the parallel version of VASP the following software is mandatory:

  • Fortran and C compilers.
  • An implementation of MPI (Message Passing Interface).
  • Numerical libraries like BLAS, LAPACK, ScaLAPACK, and FFTW.

Build system

The build system of VASP (as of versions >= 5.4.1) has the followingstructure:

root/
Holds the high-level makefile, and several subdirectories.
root/src
Holds the source files of VASP, and a low-level makefile.
root/src/lib
Holds the source of the VASP library (used to be vasp.X.lib), and a low-level makefile.
root/src/parser
Holds the source of the LOCPROJ parser (as of versions >= 5.4.4), and a low-level makefile.
root/src/CUDA
Holds the source of the cuda-code that will be executed on the GPU by the GPU port of VASP.
root/arch
Holds a collection of makefile.include.arch files.
root/build
The different versions of VASP, i.e., the standard, gamma-only, non-collinear version will be build in separate subdirectories of this directory.
root/bin
Here make will store the binaries.

How to make VASP

Copy one of the makefile.include.arch files in root/arch to root/makefile.include.Take one that most closely reflects your system (hopefully).For instance, on a linux box with the Intel Composer suite:

In many cases these makefile.include files will have to be adapted to the particulars of your system (see below).

When you've finished setting up makefile.include, build VASP:

This will build the standard, gamma-only, and non-collinear version of VASP one after the other.Alternatively on may build these versions individually:

To compile the GPU port of VASP:

and adapt it to the particulars of your system (see below), followed by:

to built the GPU ports of the standard and non-collinear versions, respectively.

N.B.: Unfortunately at this time we do not offer a GPU port of the gamma-only version yet.

Adapting makefile.include

Precompiler variables

CPP_OPTIONS
Specify the precompiler flags:
Take a lead from the makefile.include.arch files in /arch, and have a look at the description of the commonly used VASP prcompiler flags.
  • N.B.I: -DNGZhalf, -DwNGZhalf, -DNGXhalf, -DwNGXhalf are deprecated options. Building the standard, gamma-only, or non-collinear version of the code is specified through an additional argument to the make command (see the make section).
  • N.B.II: CPP_OPTIONS is only used in this file, where it should be added to CPP (see next item).
CPP
The command to invoke the precompiler you want to use, for instance:
  • Using Intel's Fortran precompiler:
  • Using cpp:
  • N.B.: This variable has to include $(CPP_OPTIONS)! If not, CPP_OPTIONS will be ignored.

Compiler variables

The Fortran compiler will be invoked as:

FREE
Specify the options that your Fortran compiler needs for it to accept free-form source layout, without line-length limitation. For instance:
  • Using Intel's Fortran compiler:
  • Using gfortran:
FC
The command to invoke your Fortran compiler (e.g. gfortran, ifort, mpif90, mpiifort, .. ).
FCL
The command that invokes the linker. In most cases:
  • Using the Intel composer suite (Fortan compiler + MKL libraries), typically:
Compile
OFLAG
The general level of optimization (default: OFLAG=-O2).
FFLAGS
Additional compiler flags.
  • To enable debugging in vasp following line can be added:
OFLAG_IN
(default: -O2) In the vast majority of makefiles this variable is set:
DEBUG
The optimization level with which the main program (main.F) will be compiled, usually:
INCS
Use this variable to specify objects to be included in the sense of:

Linking against libraries

The linker will be invoked as:

LLIBS
Specify libraries and/or objects to be linked against, in the usual ways:

Usually one has to specify several numerical libraries (BLAS, LAPACK or scaLAPACK, etc). For instance using the Intel composer suite (and compiling with CPP_OPTIONS= . -DscaLAPACK .):

For other configurations please take a lead from the makefile.include.arch files under /arch, or look at the examples below.

Note on LAPACK 3.6.0 and newer

As of LAPACK >=3.6 the subroutine DGEGV is deprecated and replaced by DGGEV [[1]]. Linking against LAPACK 3.6 or higher will result in following error message:

The recommended solution to this problem is to add following line to the makefile.include

Vasp 5.4.4 Manual

and following lines to ./src/symbol.inc

This will replace all calls of DGEGV by DGGEV before compilation.

The list of objects

The standard list of objects needed to compile VASP is given by the variable SOURCE in the root/src/.objects file that is part of the distribution.

Objects to be added to this list can be specified in makefile.include by means of:

N.B.: Several objects will *have* to be added in this manner (see the following section on 'Fast-Fourier-Transforms).

Fast-Fourier-Transforms

OBJECTS
Add the objects to be compiled (or linked againts) that provide the FFTs (may include static libraries of objects .a).
INCS
In case one compiles using the fftw-library, i.e.,
then INCS can be set to the directory that holds fftw3.f:
(needed because fftw3d.F and fftmpiw.F include fftw3.f).
N.B.: If in the aformentioned case INCS is not set, then fftw3.f has to be present in /src.

Common choices are:

  • To use Intel's MKL wrapper of fftw (and compiling with CPP_OPTIONS= . -DMPI .):
  • Or to use Juergen Furtmueller's FFT implementation (and -DMPI):

For other configurations please take lead from the makefile.include.arch files under /arch or look at the examples below.

Special rules

Special rules for the optimization level of FFT related objects

The makefiles of our old build systems contained a set of special rules for the optimization level allowed in the compilation of the FFT related objects. In the current build system these special rules can be duplicated by adding the following:

Special rules in general

The current src/makefile contains a set of recipes to allow for the compilation of objects at different levels of optimization (other than the general level specified by OFLAG). These recipes replace the special rules section of the makefiles in our old build system.

In these recipes the compiler will be invoked as:

where x stands for: 1, 2, 3, or IN.

FFLAGS_x
Default: FFLAGS_x=$(FFLAGS), for x=1, 2, 3, and IN.
OFLAG_x
Default: OFLAG_x=-Ox (for x=1, 2, 3), and OFLAG_IN=-O2
INCS_x
Default: INCS_x=$(INCS), for x=1, 2, 3, and IN.

Gmail account creator bot online. The objects to be compiled in accordance with these recipes have to be specified by means of the variables:

OBJECTS_O1, OBJECTS_O2, OBJECTS_O3, OBJECTS_IN

Several objects are compiled at -O1 and -O2 by default. These lists of objects are specified in the .objects file through the variables:

SOURCE_O1, SOURCE_O2, SOURCE_IN

and reflect the special rules as they were present in most of the makefiles of the old build system.

To completely overrule a default setting (for instance for the -O1 special rules) use the following construct:

For the VASP library (lib)

CPP_LIB
The command to invoke the precompiler. In most cases it will suffise to set:
FC_LIB
The command to invoke your Fortran compiler. In most cases:
N.B.: the library can be compiled without MPI support, i.e., when FC=mpif90, FC_LIB may specify a Fortran compiler without MPI supprt, e.g. FC_LIB=ifort.
FFLAGS_LIB
Fortran compiler flags, including a specification of the level of optimization. In most cases:
FREE_LIB
Specify the options that your Fortran compiler needs for it to accept free-form source layout, without line-length limitation. In most cases it will suffise to set:
CC_LIB
The command to invoke your C compiler (e.g. gcc, icc, .).
N.B.: the library can be compiled without MPI support.
CFLAGS_LIB
C compiler flags, including a specification of the level of optimization. In most cases:
Vasp 5.4.4 Manual
OBJECTS_LIB
List of 'non-standard' objects to be added to the library. In most cases:
When compiling VASP with -Duse_shmem, one has to add getshmem.o as well, i.e.,
Makefile.include.linux_intel

For the LOCPROJ-parser (parser)

Simulation
CXX_PARS
The command to invoke your C++ compiler (e.g. g++, icpc, .).

And tell make that the parser needs to be compiled:

and needs to be linked against:

For the interface to Wannier90 (optional)

To include the interface to Wannier90(-DVASP2WANNIER90 or -DVASP2WANNIER90v2),one needs to specify:

And one needs to download Wannier90 and compile libwannier.a.

For libbeef (optional)

In case one wants to compile VASP with the BEEF van-der-Waals functionals (-Dlibbeef),one needs to add:

And one needs to download and compile libbeef, of course.

For the GPU port

CUDA_ROOT
Location of CUDA toolkit install. For example:
CUDA_LIB
CUDA toolkit libraries to link to. Typically:
NVCC
Location of CUDA compiler and flags. Typically:
OBJECTS_GPU
Add the objects to be compiled (or linked againts) that provide the FFTs (may include static libraries of objects .a). For FFTW:
GENCODE_ARCH
CUDA compiler options to generate code for your particular GPU architecture.
For Kepler:
For Maxwell:
Multiple `-gencode` statements can be compiled to create cross-platform executables.
For details see the NVIDIA nvcc documentation.
MPI_INC
Path to MPI include files so the CUDA compiler can find them. For example:
These can often be found with mpicc --show.

Vasp5.4.4

CPP_GPU
Preprocessor options for GPU compilation.
Always include:
-DCUDA_GPU to build cross-platform sources for GPU, -DUSE_PINNED_MEMORY to use pinned memory for transfer buffers, and -DRPROMU_CPROJ_OVERLAP to overlap communication and computation in RPROJ_MU.
Optional:
Set -DCUFFT_MIN=N to intercept any FFT calls of size greater than N3 and evaluate on GPU.
Experimental:
Set -DUSE_MAGMA to use MAGMA for LAPACK-like calls on the GPU.
So typically:
MAGMA_ROOT
If using the experimental MAGMA support, path to MAGMA 1.6. Typically:

Examples


Patches

For vasp.5.4.1.24Jun15

Unfortunately several bugs were reported for vasp.5.4.1.24Jun15.To fix them download the patch(es) below:

To apply these patch(es) gunzip the patch file(s) and

within your vasp.X.X.X root-directory.

For vasp.5.4.1.05Feb16 (with GPU support)

The following patch improves the mapping between MPI-ranks and GPUs on multi-node/multi-GPU systems (the issue is performance only, not a bugfix):

The following patch unfortunately does address several bugs:

  1. For noncollinear calculations LOPTICS=.TRUE. didn't work correctly with Blöchl-smearing (ISMEAR≤-4).
  2. The Zeroth-Order-Regular-Approximation (ZORA) that accounts for the relativistic mass correction in the Spin-Orbit-Coupling operator was not implemented correctly.
N.B.: Unfortunately this bugfix affects the total energy. Effects are expected to be negligible except for heavy elements.

To apply these patches gunzip the patch files and

within your vasp.X.X.X root-directory.

For vasp.5.4.4.18Apr17-6-g9f103f2a35

The following patch addresses a few issues:

  1. Fixes a bug in the stress term when using the SCAN functional in certain pathological cases.
  2. Fixes a bug in the Thomas-Fermi potential.
  3. Fixes a bug that affected the optB88 for some atoms and molecules.
  4. Fixes some issues with the BSE at finite q.

and adds support for:

  1. The CX13 vdW-DFT functional.

To apply this patch gunzip the patch file and

within your vasp.X.X.X root-directory.

Related Sections

Precompiler flags,GPU port of VASP,

Vasp 5.4.4 Mac

Retrieved from 'https://www.vasp.at/wiki/index.php?title=Installing_VASP.5.X.X&oldid=10869'
Theory

To use the full functionality of the Atomistic Simulation Environment together with VASP one needs to do certain modifications compared to the standard guidelines. This article will help setup ASE to run VASP with parallel computing

The guide here is tested and working on Vera and Hebbe and using the following modules:

  1. Python/3.7.2
  2. iccifort/2019.1.144-GCC-8.2.0-2.31.1
  3. impi/2018.4.274
  4. ASE/3.18.0-Python-3.7.2
  5. VASP/5.4.4.16052018

The usual instructions are to create a folder like ~/vasp/ and make a python script that runs ASE: run_vasp.py. This contains the following lines: Kingdom come deliverance console commands nexus.

However to run parallel calculations one needs to call mpiexec/mpirun like this:

Then VASP can easily be used in ASE. This means that you can write a submit script like this:

In edition to this set-up one also need to add the VASP Pseudopotential files and its path. Otherwise ASE will not be able to create the POTCAR file and fail to run the simulation. Thus beside the run_vasp.py, also the VASP_PP_PATH needs adding in the .bashrc:

the folder name expected by ASE for the pseudo potentials is: potpaw_PBE and a zip-file of the ones in version 5.4 is attached: potpaw_PBE.54.zip

In order to use any vdW-functional, also the place where the vdw_kernel.bindat file (copy, unpack: vdw.zip ) is stored has to be mentioned to ASE:

The BEEF-vdW functional is only available in the VASP/5.4.4.10112017-vtst module and not in the default one: VASP/5.4.4.16052018.

VASP Input files only can be created using the ASE class-definition without the need to start a calculation explicitly:

Where the ASE python script “test_pd111.py” test_pd111.txt contains a relaxation of a Pd(111) surface with one free layer as follows:

To summarize, you set up ASE to run VASP in parallel by specifying that ASE should call mpirun vasp. Then you submit your ASE script as a normal python script.