Page 1 of 1

compiling vasp 6.3.0 with HDF5 support

Posted: Fri Oct 14, 2022 6:55 am
by scpeter@jncasr
Hi
I have compiled Vasp 6.3.0 (Ubuntu 20.04.4 LTS) using the intel_oneapi_base_kit and used it for some time. Now i tried to enable the HDF5 file support in the make.include and compile it again with the intel compiler, but this time it is giving me erorr. plz. have a look. It will be great if someone provide step by step method to enable HDF5 and compile it with intel api_base toolkit.

thank you


vhdf5_base.F(458): error #6683: A kind type parameter must be a compile-time constant. [HSIZE_T]
integer(HSIZE_T) :: strlen
------------^
vhdf5_base.F(499): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: locid
------------^
vhdf5_base.f90(2794): catastrophic error: Too many errors, exiting
compilation aborted for vhdf5_base.f90 (code 1)
make[2]: *** [makefile:166: vhdf5_base.o] Error 1
make[2]: Leaving directory '/home/sebastian/Programs/vasp.6.3.0/build/std'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:129: all] Error 1
make[1]: Leaving directory '/home/sebastian/Programs/vasp.6.3.0/build/std'
make: *** [makefile:17: std] Error 2
mpiifort -qopenmp -free -names lowercase -assume byterecl -w -xHOST -O2 -I/opt/intel/oneapi/mkl/2022.0.2/include/fftw -I/usr/include/hdf5/openmpi/ -c ml_ff_logfile.f90
mpiifort -qopenmp -free -names lowercase -assume byterecl -w -xHOST -O2 -I/opt/intel/oneapi/mkl/2022.0.2/include/fftw -I/usr/include/hdf5/openmpi/ -c command_line.f90
mpiifort -qopenmp -free -names lowercase -assume byterecl -w -xHOST -O2 -I/opt/intel/oneapi/mkl/2022.0.2/include/fftw -I/usr/include/hdf5/openmpi/ -c vhdf5_base.f90
mpiifort -qopenmp -free -names lowercase -assume byterecl -w -xHOST -O2 -I/opt/intel/oneapi/mkl/2022.0.2/include/fftw -I/usr/include/hdf5/openmpi/ -c mathtools.f90
vhdf5_base.F(6): error #7013: This module file was not generated by any release of this compiler. [HDF5]
use hdf5
------^
vhdf5_base.F(35): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T):: ih5intermediategroup_id
----------^
vhdf5_base.F(36): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T):: ih5infileid
----------^
vhdf5_base.F(37): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T):: ih5outfileid
----------^
vhdf5_base.F(38): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T):: ih5wavefileid
----------^
vhdf5_base.F(39): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T):: ih5ininputgroup_id
----------^
vhdf5_base.F(40): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T):: ih5outinputgroup_id
----------^
vhdf5_base.F(41): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T):: ih5outoriginalgroup_id
----------^
vhdf5_base.F(56): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T) :: create_inter_prop
----------^
vhdf5_base.F(203): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: fileid
------------^
vhdf5_base.F(217): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: fileid
------------^
vhdf5_base.F(231): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: fileid
------------^
vhdf5_base.F(246): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: fileid
------------^
vhdf5_base.F(262): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: fileid
------------^
vhdf5_base.F(273): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: fileid
------------^
vhdf5_base.F(315): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: fileid
------------^
vhdf5_base.F(343): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: locid
------------^
vhdf5_base.F(345): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: groupid
------------^
vhdf5_base.F(356): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: groupid
------------^
vhdf5_base.F(369): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: locid
------------^
vhdf5_base.F(371): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: groupid
------------^
vhdf5_base.F(386): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: locid
------------^
vhdf5_base.F(388): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(out) :: groupid
------------^
vhdf5_base.F(409): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: groupid
------------^
vhdf5_base.F(425): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: locid
------------^
vhdf5_base.F(450): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: groupid
------------^
vhdf5_base.F(456): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T) :: dset_id, attr_id, aspace, string_type
------------^
vhdf5_base.F(457): error #6683: A kind type parameter must be a compile-time constant. [HSIZE_T]
integer(HSIZE_T) :: dimensions(1)
------------^
vhdf5_base.F(458): error #6683: A kind type parameter must be a compile-time constant. [HSIZE_T]
integer(HSIZE_T) :: strlen
------------^
vhdf5_base.F(499): error #6683: A kind type parameter must be a compile-time constant. [HID_T]
integer(HID_T), intent(in) :: locid
------------^
vhdf5_base.f90(2796): catastrophic error: Too many errors, exiting
compilation aborted for vhdf5_base.f90 (code 1)
make[2]: *** [makefile:166: vhdf5_base.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/sebastian/Programs/vasp.6.3.0/build/gam'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:129: all] Error 1
make[1]: Leaving directory '/home/sebastian/Programs/vasp.6.3.0/build/gam'
make: *** [makefile:17: gam] Error 2

Re: compiling vasp 6.3.0 with HDF5 support

Posted: Fri Oct 14, 2022 7:01 am
by fabien_tran1
Hi,

Can you please provide the makefile.include file.

Re: compiling vasp 6.3.0 with HDF5 support

Posted: Fri Oct 14, 2022 8:51 am
by scpeter@jncasr
thank you for the prompt reply,
this is the makeinclude file..

# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxIFC\" \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Duse_bse_te \
-Dtbdyn \
-Dfock_dblbuf

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

FC = mpiifort
FCL = mpiifort

FREE = -free -names lowercase

FFLAGS = -assume byterecl -w

OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0

OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
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

# For the parser library
CXX_PARS = icpc
LLIBS = -lstdc++

##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##

# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
FFLAGS += -xHOST

# Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK)
# (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl)
FCL += -qmkl=sequential
MKLROOT ?= /path/to/your/mkl/installation
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
INCS =-I$(MKLROOT)/include/fftw

# HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT ?= /path/to/your/hdf5/installation
LLIBS += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran #(here i try with mpich also replacing openmpi, but gives same error)
INCS += -I/usr/include/hdf5/openmpi/

# For the VASP-2-Wannier90 interface (optional)
#CPP_OPTIONS += -DVASP2WANNIER90
#WANNIER90_ROOT ?= /path/to/your/wannier90/installation
#LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier

Re: compiling vasp 6.3.0 with HDF5 support

Posted: Fri Oct 14, 2022 7:47 pm
by fabien_tran1
The paths to include the HDF5 libraries (LLIBS) and files (INCS) are not correct. As usual, the directories (see wiki/index.php/Makefile.include#HDF5_su ... mmended.29) should be $(HDF5_ROOT)/lib and $(HDF5_ROOT)/include. You have to find out what is $(HDF5_ROOT) on your system.