|
| 1 | +Enables HDF5 and Wannier, sets up MKL root, switch to icx and icpx |
| 2 | +Author: J. Saßmannshausen (Imperial College London) |
| 3 | +Makes VDW_kernel.bindat loadable externally (courtesy of Mikael Öhman) |
| 4 | +diff --git a/vasp.6.4.3.org/arch/makefile.include.intel b/vasp.6.4.3/arch/makefile.include.intel |
| 5 | +index 1d18232..2b8696e 100644 |
| 6 | +--- a/vasp.6.4.3.org/arch/makefile.include.intel |
| 7 | ++++ b/vasp.6.4.3/arch/makefile.include.intel |
| 8 | +@@ -29,7 +29,7 @@ OBJECTS_O2 += fft3dlib.o |
| 9 | + # For what used to be vasp.5.lib |
| 10 | + CPP_LIB = $(CPP) |
| 11 | + FC_LIB = $(FC) |
| 12 | +-CC_LIB = icc |
| 13 | ++CC_LIB = icx |
| 14 | + CFLAGS_LIB = -O |
| 15 | + FFLAGS_LIB = -O1 |
| 16 | + FREE_LIB = $(FREE) |
| 17 | +@@ -37,7 +37,7 @@ FREE_LIB = $(FREE) |
| 18 | + OBJECTS_LIB = linpack_double.o |
| 19 | + |
| 20 | + # For the parser library |
| 21 | +-CXX_PARS = icpc |
| 22 | ++CXX_PARS = icpx |
| 23 | + LLIBS = -lstdc++ |
| 24 | + |
| 25 | + ## |
| 26 | +@@ -54,17 +54,17 @@ FFLAGS += $(VASP_TARGET_CPU) |
| 27 | + # Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK) |
| 28 | + # (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl) |
| 29 | + FCL += -qmkl=sequential |
| 30 | +-MKLROOT ?= /path/to/your/mkl/installation |
| 31 | +-LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 |
| 32 | +-INCS =-I$(MKLROOT)/include/fftw |
| 33 | ++# MKLROOT += ${EBROOTIMKL} |
| 34 | ++LLIBS += -L$(MKLROOT)/mkl/latest/lib -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 |
| 35 | ++INCS = -I$(MKLROOT)/include/fftw |
| 36 | + |
| 37 | + # HDF5-support (optional but strongly recommended) |
| 38 | +-#CPP_OPTIONS+= -DVASP_HDF5 |
| 39 | +-#HDF5_ROOT ?= /path/to/your/hdf5/installation |
| 40 | +-#LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran |
| 41 | +-#INCS += -I$(HDF5_ROOT)/include |
| 42 | ++CPP_OPTIONS += -DVASP_HDF5 |
| 43 | ++HDF5_ROOT += ${EBROOTHDF5} |
| 44 | ++LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran |
| 45 | ++INCS += -I$(HDF5_ROOT)/include |
| 46 | + |
| 47 | + # For the VASP-2-Wannier90 interface (optional) |
| 48 | +-#CPP_OPTIONS += -DVASP2WANNIER90 |
| 49 | +-#WANNIER90_ROOT ?= /path/to/your/wannier90/installation |
| 50 | +-#LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier |
| 51 | ++CPP_OPTIONS += -DVASP2WANNIER90 |
| 52 | ++WANNIER90_ROOT += ${EBROOTWANNIER90} |
| 53 | ++LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier |
| 54 | +diff --git a/vasp.6.4.3.org/src/vdw_nl.F b/vasp.6.4.3/src/vdw_nl.F |
| 55 | +index 1f1f11c..4c1ec83 100644 |
| 56 | +--- a/vasp.6.4.3.org/src/vdw_nl.F |
| 57 | ++++ b/vasp.6.4.3/src/vdw_nl.F |
| 58 | +@@ -449,13 +449,19 @@ CONTAINS |
| 59 | + SUBROUTINE PHI_GENERATE(GRIDC,IVDW_NL,GAMMA_VDW,ALPHA_VDW) |
| 60 | + logical :: lkern,lkern_new |
| 61 | + integer :: IVDW_NL,IVDW_NL_TMP,NINTG_TMP,nmesh,IOstatus |
| 62 | ++ character(len=255) :: vdwkernel |
| 63 | + real(q) :: GAMMA_VDW,GAMMA_VDW_TMP,ALPHA_VDW,ALPHA_VDW_TMP |
| 64 | + TYPE (grid_3d) GRIDC |
| 65 | + |
| 66 | + !ok if the kernel table is here read it |
| 67 | +- inquire( file='vdw_kernel.bindat', exist=lkern) |
| 68 | ++ vdwkernel = 'vdw_kernel.bindat' |
| 69 | ++ inquire( file=vdwkernel, exist=lkern) |
| 70 | ++ IF (.NOT. lkern) then |
| 71 | ++ call get_environment_variable("VDW_KERNEL", vdwkernel) |
| 72 | ++ inquire( file=trim(vdwkernel), exist=lkern) |
| 73 | ++ ENDIF |
| 74 | + IF (lkern) then |
| 75 | +- open (unit=10, file='vdw_kernel.bindat', form='unformatted') |
| 76 | ++ open (unit=10, file=trim(vdwkernel), form='unformatted', action='READ') |
| 77 | + read(10,IOSTAT=IOstatus) IVDW_NL_TMP,GAMMA_VDW_TMP,ALPHA_VDW_TMP,NINTG_TMP,nmesh |
| 78 | + IF (IOstatus.EQ.0) THEN |
| 79 | + lkern_new=.true. |
0 commit comments