All requests for technical support from the VASP group must be addressed to: vasp.materialphysik@univie.ac.at

A Fedora based installation of VASP

From Vaspwiki
Jump to: navigation, search

The following guide builds an OpenMPI version of VASP using the GNU compiler suite and the LAPACK, SCALAPACK and FFTW library provided by the internal package manager YUM. This guide was tested successfully for Fedora 27. Note, that following steps yield a version of VASP without OpenMP support.

  • Open a terminal and make sure that all relevant GNU compilers are installed
# yum install automake gcc gcc-c++ gcc-gfortran kernel-devel
  • The following command installs all necessary libraries for VASP, that is LAPACK, SCALAPACK, OpenMPI and FFTW
# yum install lapack-devel openmpi-devel scalapack-openmpi-devel fftw2-devel fftw-devel
  • Extract the VASP tar ball
tar -xzvf vasp.VERSION.tar.gz 
cd vasp.VERSION
  • Create a file "makefile.include" with following content
# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxGNU\" \
            -DMPI -DMPI_BLOCK=8000 -Duse_collective \
            -DscaLAPACK -DCACHE_SIZE=4000 \
            -Davoidalloc -Duse_bse_te \
            -Dtbdyn -Duse_shmem

CPP        = gcc -E -P -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)

FC         = mpif90
FCL        = mpif90 

FREE       = -ffree-form -ffree-line-length-none 

FFLAGS     = -w
OFLAG      = -O2 
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

LIBDIR     = /usr/lib64
BLAS       = -L$(LIBDIR) -lblas
LAPACK     = -L$(LIBDIR) -llapack
BLACS      = 
SCALAPACK  = -L$(LIBDIR)/openmpi/lib -lscalapack $(BLACS)

LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)

LLIBS      += -lfftw3
INCS       = -I/usr/include

OBJECTS    = fftmpiw.o fftmpi_map.o  fftw3d.o  fft3dlib.o 

OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB    = $(CPP)
FC_LIB     = $(FC)
CC_LIB     = gcc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB   = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o 

# For the parser library
CXX_PARS   = g++  
LIBS       += parser
LLIBS      += -Lparser -lparser -lstdc++

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin
  • Build std, gam and ncl versions of VASP
make std gam ncl

After a successful build the corresponding executables are found in ./bin