Compiling VASP 5.2.12 on HECToR Phase 3 (XE6)

This page provides compilation instructions for VASP 5.2.12 on HECToR Phase 3 (Cray XE6, Interlagos).

Module Setup

Swap to the GNU compiler suite; load the FFTW library module and the hugepages module:

module swap PrgEnv-cray PrgEnv-gnu
module add fftw
module add craype-hugepages2M

Swap to GCC 4.6.3 as the 4.7.* series have introduced a check on syntax that VASP fails (cannot use a module in a source file with the same name as the module, fails for 'dfast.F').

module swap gcc gcc/4.6.3

Full list of loaded modules at compile time for the centrally installed version:

Currently Loaded Modulefiles:
  1) modules/3.2.6.6
  2) nodestat/2.2-1.0400.31264.2.5.gem
  3) sdb/1.0-1.0400.32124.7.19.gem
  4) MySQL/5.0.64-1.0000.5053.22.1
  5) lustre-cray_gem_s/1.8.6_2.6.32.45_0.3.2_1.0400.6453.7.1-1.0400.38471.0.0
  6) udreg/2.3.1-1.0400.4264.3.1.gem
  7) ugni/2.3-1.0400.4374.4.88.gem
  8) gni-headers/2.1-1.0400.4351.3.1.gem
  9) dmapp/3.2.1-1.0400.4255.2.159.gem
 10) xpmem/0.1-2.0400.31280.3.1.gem
 11) hss-llm/6.0.0
 12) Base-opts/1.0.2-1.0400.31284.2.2.gem
 13) xtpe-network-gemini
 14) PrgEnv-gnu/4.0.46
 15) xt-mpich2/5.6.0
 16) atp/1.6.0
 17) xt-asyncpe/5.16
 18) pmi/4.0.0-1.0000.9282.69.4.gem
 19) xt-libsci/12.0.00
 20) xt-totalview/8.9.2
 21) totalview-support/1.1.2
 22) gcc/4.6.3
 23) pbs/10.2.2.113537
 24) packages-phase3
 25) bolt/0.5
 26) budgets/1.0
 27) xtpe-interlagos
 28) fftw/3.3.0.1
 29) craype-hugepages2M

Modify the makefile

Full preprocessor flag list:

CPP    = $(CPP_) -DMPI -DHOST=\"CrayXE-GNU\" \
          -DNGZhalf \
          -Dkind8 \
          -DCACHE_SIZE=2000 \
          -Davoidalloc \
          -DRPROMU_DGEMV  \
          -DMPI_BLOCK=100000 \
          -Duse_collective \
          -Drandom_array \
          -DscaLAPACK

Above is for multiple k-point version of VASP. For the GAMMA-point only code you would add -DwNGZhalf ; for the noncollinear versions you would remove -DNGZhalf.; and for the Anderesen thermostat version you would add -Dtbdyn.

Additional changes:

FFLAGS = -ffree-form -ffree-line-length-none
OFLAG  = -O3 -fexternal-blas -ffast-math -funroll-loops

Use the FFTW library for Fourier transforms:

# FFT: FFTW3
FFT3D   = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o

Build the code

Get the makefiles from /usr/local/packages/vasp5/5.2.12-phase3/makefiles:

  • makefile.cray_xe_gnu.lib - Makefile for vasp5.lib source code
  • makefile.cray_xe_gnu - Makefile for multiple k-point VASP
  • makefile.cray_xe.gnu.gamma - Makefile for GAMMA-point only VASP
  • makefile.cray_xe_gnu.noncollinear - Makefile for multiple k-point, noncollinear VASP
  • makefile.cray_xe_gnu.tbdyn - Makefile for multiple k-point with Andersen thermostat

Build the library code

cd vasp.5.lib
make -f makefile.cray_xe_gnu.lib clean
make -f makefile.cray_xe_gnu.lib

Build the main code:

cd vasp.5.2
make -f makefile.cray_xe_gnu clean
make -f makefile.cray_xe_gnu

This will build the multiple k-point version of the code. Use the different makefiles for different versions of VASP (note: they all produce an executable called vasp).

Including the VTST routines

The University of Texas provide a number of modifications to the VASP code for transition state calculations. To add these to VASP you shoul first download the code and scripts from:

You then need to make a couple of modifications to source code files. Firstly, in main.F replace the lines:

      CALL CHAIN_FORCE(T_INFO%NIONS,DYN%POSION,TOTEN,TIFOR, &
           LATT_CUR%A,LATT_CUR%B,IO%IU6)

with:

      CALL CHAIN_FORCE(T_INFO%NIONS,DYN%POSION,TOTEN,TIFOR, &
           TSIF,LATT_CUR%A,LATT_CUR%B,IO%IU6)

Secondly, in the chain.F file, replace the line:

      PARAMETER EVTOJ=1.60217733E-19_q

with:

      REAL(q), PARAMETER :: EVTOJ=1.60217733E-19_q

Next, you need to add the following lines to the list of object files in the VASP makefiles:

         dimer.o dynmat.o neb.o lanczos.o instanton.o \
         sd.o cg.o qm.o lbfgs.o bfgs.o fire.o opt.o \

after the line:

         dos.o      elf.o      tet.o      tetweight.o hamil_rot.o \

Back to the VASP page