PGI Guide to VASP

This guide is intended to help build VASP Version 5.2 on Linux with PGI 2010 compilers.

Version Information

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.

Application Notes

Information about the Vienna Ab initio Simulation Package (VASP) can be found at the VASP home page.

Obtaining the Source Code

VASP is not open source software. You may obtain a license for VASP by contacting Prof. Dr. Juergen Hafner ( ). 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.

Configuration and Set-up Information

  1. 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
    CFLAGS = -fast -Mcache_align
    FFLAGS = -i8 -fast -Mcache_align
    lapack_min.o: lapack_min.f
    		 $(FC) $(FFLAGS) $(NOFREE) -c lapack_min.f
  2. Build the VASP library:

  3. Change directories to VASP proper:

    cd ../vasp.5.2/serial
  4. Change the two instances for the include path for fftw3.f in the file fftw3d.f:

     include '/usr/local/include/fftw3.f'
  5. 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
     # Use GotoBLAS2
     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					 
  6. 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.

  7. Build VASP:

    make -f makefile.linux_pg
  8. To Run:

    cd run ~/vasp.5.2/serial/vasp 

Known Issues and Limitations

The requirement to edit the paw.F file should be remove in an early PGI 2011 release.

Click me