This guide was created for VASP version 5.2 release and the PGI Release 2010. This information is for x64 processors running 64-bit Linux.
Information about the Vienna Ab initio Simulation Package (VASP) can be found at the VASP home page.
VASP is not open source software. You may obtain a license for VASP by contacting Prof. Dr. Juergen Hafner ( Juergen.Hafner@univie.ac.at ). Give some basic information about your affiliation in your email, so he can send the appropriate license agreement forms to you.
A basic linear algebra package built using the same release version of the PGI compilers is required. Please refer to the PGI Guide to GotoBLAS for more information on building GotoBLAS. You will also need to build FFTWV3 with the same release version of the PGI compilers. Please refer to the PGI Guide to FFTW for more information on building FFTW version 3.
Unzip and untar your VASP package and cd to the created vasl.5.lib.i8 directory.
Edit the makefile and make the following changes
CPP = gcc -E -P -C $*.F >$*.f FC=pgfortran CC=pgcc CFLAGS = -fast -Mcache_align FFLAGS = -i8 -fast -Mcache_align .... lapack_min.o: lapack_min.f $(FC) $(FFLAGS) $(NOFREE) -c lapack_min.f
Build the VASP library:
make
Change directories to VASP proper:
cd ../vasp.5.2/serial
Change the two instances for the include path for fftw3.f in the file fftw3d.f:
include '/usr/local/include/fftw3.f'
Edit the makefile.linux_pg and make the following changes:
GOTO = /usr/local # set to path of installed GotoBLAS2 libraries FFTW = /usr/local # set to path of installed FFTW3 libraries FFLAGS = -i8 -Mfree -Mcache_align # also set include path for FFTW if needed: -I$(FFTW)/include ... OFLAG = -O2 ... #ATLASHOME=.... #BLAS=.... ... # Use GotoBLAS2 BLAS=$(GOTO)/libgoto2_yourarchitecture.a ... LAPACK=../../vasp.5.lib.i8/lapack_double.o ... LIB = -L../../vasp.5.lib.i8 -ldmy ../../vasp.5.lib.i8/linpack_double.o \ -L$(FFTW)/lib -lfftw3 $(LAPACK) $(BLAS) ... FFT3D = fftw3d.o fft3dlib.o $(FFTW)/lib/libfftw3.a
Edit the file paw.F and change the automatic arrays in the last routine - SET_DD_PAW - to allocatable arrays. Be sure to also add allocate statements.
Build VASP:
make -f makefile.linux_pg
To Run:
cd run ~/vasp.5.2/serial/vasp
The requirement to edit the paw.F file should be remove in an early PGI 2011 release.