Skip to content

VASP

Production phase: DelftBlue 2022r2 software stack

To compile VASP 5.4.4 on DelftBlue (standard, non-GPU version & gamma point version):

Note: this recipe has been tried for VASP v5.4.4

  1. Load intel/oneapi-all:
module load 2022r2
module load intel/oneapi-all
  1. Make the following modifications to the xclib.F file of VASP:

  2. in the src subdirectory within the VASP directory, copy xclib.F to xclib_part2.F

  3. in xclib.F, remove the second module, i.e. delete everything after the line END MODULE xclib, i.e. line 2045 and beyond
  4. in xclib_part2.F, remove the lines of the first module, i.e. lines 3 to 2045
  5. in the file src/.objects, after the two occurrences of the line xclib.o \ add the line xclib_part2.o \

  6. Use the following makefile.include configuration:

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
             -DMPI -DMPI_BLOCK=8000 \
             -Duse_collective \
             -DscaLAPACK \
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Duse_bse_te \
             -Dtbdyn \
             -Duse_shmem

CPP        = fpp -f_com=no -free -w0  $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

FC         = mpiifort
FCL        = mpiifort -mkl=sequential -lstdc++

FREE       = -free -names lowercase

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

MKL_PATH   = $(MKLROOT)/lib/intel64
BLAS       =
LAPACK     =
BLACS      = -lmkl_blacs_intelmpi_lp64
SCALAPACK  = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)

OBJECTS    = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d.o 
#             /home/pklaver/progs/vasp/vasp541-gpu/vasp.5.4.1/libfftw3xf_intel.a

INCS       =-I/mnt/shared/cm/shared/intel/compilers_and_libraries_2020.4.304/linux/mkl/include/fftw/

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


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     = icc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB   = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o

# For the parser library
CXX_PARS   = icpc

LIBS       += parser
LLIBS      += -Lparser -lparser -lstdc++

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin

#================================================
# GPU Stuff

CPP_GPU    = -DCUDA_GPU -DRPROMU_CPROJ_OVERLAP -DUSE_PINNED_MEMORY -DCUFFT_MIN=28 -UscaLAPACK

OBJECTS_GPU = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d_gpu.o fftmpiw_gpu.o

CC         = icc
CXX        = icpc
CFLAGS     = -fPIC -DADD_ -Wall -qopenmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DGPUSHMEM=300 -DHAVE_CUBLAS

CUDA_ROOT  := /opt/ud/cuda-8.0
NVCC       := $(CUDA_ROOT)/bin/nvcc -ccbin=icc
#CUDA_LIB   := -L$(CUDA_ROOT)/lib64 -lnvToolsExt -lcudart -lcuda -lcufft -lcublas
CUDA_LIB   := -L$(CUDA_ROOT)/lib64 -lnvToolsExt -lcudart -lcufft -lcublas

GENCODE_ARCH    := -gencode=arch=compute_30,code=\"sm_30,compute_30\" \
                   -gencode=arch=compute_35,code=\"sm_35,compute_35\" \
                   -gencode=arch=compute_60,code=\"sm_60,compute_60\"

#MPI_INC    = $(I_MPI_ROOT)/include64/
MPI_INC    = /opt/ud/openmpi-1.8.8/include/
  1. Compile:
make std
make gam