Error in vaspout.h5

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
Sherif_Yehia1
Newbie
Newbie
Posts: 6
Joined: Wed Aug 24, 2022 5:36 pm

Error in vaspout.h5

#1 Post by Sherif_Yehia1 » Wed Jan 18, 2023 3:48 pm

Dear Users and experts

Can any one point my mistakes in compiling vasp error with vhdf5.F

I guess this FORTRAN program is not responding to hdf5

Hdf5 compiled fine with NO ERROR

1- (base) [root@192 sherifyehia]# grep H5_VERS_INFO /usr/local/hdf5/include/H5public.h

#define H5_VERS_INFO “HDF5 library version: 1.12.2”
2- [sherifyehia@192 ~]$ which h5dump

/opt/intel/oneapi/intelpython/latest/bin/h5dump



But vasp when we switch the HDF5 key gives the following errors

Here are a sample of the given errors

vhdf5_base.o: In function `vhdf5_base_mp_vh5_start_':
vhdf5_base.f90:(.text+0x46): undefined reference to `h5lib_mp_h5open_f_'
vhdf5_base.f90:(.text+0x52): undefined reference to `h5global_mp_h5p_link_create_f_'
vhdf5_base.f90:(.text+0x60): undefined reference to `h5p_mp_h5pcreate_f_'
vhdf5_base.f90:(.text+0x7a): undefined reference to `h5p_mp_h5pset_create_inter_group_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_end_':
vhdf5_base.f90:(.text+0x96): undefined reference to `h5lib_mp_h5close_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_file_open_read_':
vhdf5_base.f90:(.text+0xa8): undefined reference to `h5global_mp_h5f_acc_rdonly_f_'
vhdf5_base.f90:(.text+0xb4): undefined reference to `h5f_mp_h5fopen_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_file_open_readwrite_':
vhdf5_base.f90:(.text+0xd3): undefined reference to `h5global_mp_h5f_acc_rdwr_f_'
vhdf5_base.f90:(.text+0xe5): undefined reference to `h5f_mp_h5fopen_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_file_close_':
vhdf5_base.f90:(.text+0xf6): undefined reference to `h5f_mp_h5fclose_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_file_create_':
vhdf5_base.f90:(.text+0x11e): undefined reference to `h5global_mp_h5f_acc_excl_f_'
vhdf5_base.f90:(.text+0x132): undefined reference to `h5f_mp_h5fcreate_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_file_create_or_overwrite_':
vhdf5_base.f90:(.text+0x15e): undefined reference to `h5global_mp_h5f_acc_trunc_f_'
vhdf5_base.f90:(.text+0x172): undefined reference to `h5f_mp_h5fcreate_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_file_close_writing_':
vhdf5_base.f90:(.text+0x19a): undefined reference to `h5f_mp_h5fclose_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_file_flush_':
vhdf5_base.f90:(.text+0x2cf): undefined reference to `h5global_mp_h5f_scope_local_f_'
vhdf5_base.f90:(.text+0x2de): undefined reference to `h5f_mp_h5fflush_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_group_open_':
vhdf5_base.f90:(.text+0x2fc): undefined reference to `h5g_mp_h5gopen_f_'



Please see my linker

total 20340
drwxr-xr-x. 2 root root 4096 Jan 18 15:32 .
drwxr-xr-x. 6 root root 56 Jan 18 15:32 …
-rw-r–r--. 1 root root 11791634 Jan 18 15:31 libhdf5.a
-rw-r–r--. 1 root root 1369916 Jan 18 15:31 libhdf5_cpp.a
-rwxr-xr-x. 1 root root 992 Jan 18 15:31 libhdf5_cpp.la
lrwxrwxrwx. 1 root root 22 Jan 18 15:31 libhdf5_cpp.so -> libhdf5_cpp.so.200.2.0
lrwxrwxrwx. 1 root root 22 Jan 18 15:31 libhdf5_cpp.so.200 -> libhdf5_cpp.so.200.2.0
-rwxr-xr-x. 1 root root 549232 Jan 18 15:31 libhdf5_cpp.so.200.2.0
-rw-r–r--. 1 root root 543800 Jan 18 15:32 libhdf5_fortran.a
-rwxr-xr-x. 1 root root 1020 Jan 18 15:32 libhdf5_fortran.la
lrwxrwxrwx. 1 root root 26 Jan 18 15:32 libhdf5_fortran.so -> libhdf5_fortran.so.200.1.1
lrwxrwxrwx. 1 root root 26 Jan 18 15:32 libhdf5_fortran.so.200 -> libhdf5_fortran.so.200.1.1
-rwxr-xr-x. 1 root root 482024 Jan 18 15:32 libhdf5_fortran.so.200.1.1
-rw-r–r--. 1 root root 284340 Jan 18 15:32 libhdf5_hl.a
-rw-r–r--. 1 root root 18232 Jan 18 15:32 libhdf5_hl_cpp.a
-rwxr-xr-x. 1 root root 1082 Jan 18 15:32 libhdf5_hl_cpp.la
lrwxrwxrwx. 1 root root 25 Jan 18 15:32 libhdf5_hl_cpp.so -> libhdf5_hl_cpp.so.200.1.0
lrwxrwxrwx. 1 root root 25 Jan 18 15:32 libhdf5_hl_cpp.so.200 -> libhdf5_hl_cpp.so.200.1.0
-rwxr-xr-x. 1 root root 19192 Jan 18 15:32 libhdf5_hl_cpp.so.200.1.0
lrwxrwxrwx. 1 root root 19 Jan 18 15:32 libhdf5_hl_fortran.a -> libhdf5hl_fortran.a
-rw-r–r--. 1 root root 250566 Jan 18 15:32 libhdf5hl_fortran.a
-rwxr-xr-x. 1 root root 1107 Jan 18 15:32 libhdf5hl_fortran.la
lrwxrwxrwx. 1 root root 20 Jan 18 15:32 libhdf5_hl_fortran.so -> libhdf5hl_fortran.so
lrwxrwxrwx. 1 root root 28 Jan 18 15:32 libhdf5hl_fortran.so -> libhdf5hl_fortran.so.200.0.2
lrwxrwxrwx. 1 root root 28 Jan 18 15:32 libhdf5hl_fortran.so.200 -> libhdf5hl_fortran.so.200.0.2
-rwxr-xr-x. 1 root root 217072 Jan 18 15:32 libhdf5hl_fortran.so.200.0.2
-rwxr-xr-x. 1 root root 994 Jan 18 15:32 libhdf5_hl.la
lrwxrwxrwx. 1 root root 21 Jan 18 15:32 libhdf5_hl.so -> libhdf5_hl.so.200.1.0
lrwxrwxrwx. 1 root root 21 Jan 18 15:32 libhdf5_hl.so.200 -> libhdf5_hl.so.200.1.0
-rwxr-xr-x. 1 root root 155640 Jan 18 15:32 libhdf5_hl.so.200.1.0
-rwxr-xr-x. 1 root root 942 Jan 18 15:31 libhdf5.la
-rw-r–r--. 1 root root 4307 Jan 18 15:31 libhdf5.settings
lrwxrwxrwx. 1 root root 18 Jan 18 15:31 libhdf5.so -> libhdf5.so.200.2.0
lrwxrwxrwx. 1 root root 18 Jan 18 15:31 libhdf5.so.200 -> libhdf5.so.200.2.0
-rwxr-xr-x. 1 root root 5087776 Jan 18 15:31 libhdf5.so.200.2.0
(base) [sherifyehia@192 /]$

How to fix that

Thanks all

Sherif_Yehia1
Newbie
Newbie
Posts: 6
Joined: Wed Aug 24, 2022 5:36 pm

Error In Hdf5 Installation

#2 Post by Sherif_Yehia1 » Mon Jan 23, 2023 2:52 pm

Dear Experts

I getting error when I switch CPP_OPTIONS in the makefile.include

# HDF5-support (optional but strongly recommended)
CPP_OPTIONS += -DVASP_HDF5
HDF5_ROOT ?= /usr/local/hdf5
LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran -lhdf5
INCS += -I$(HDF5_ROOT)/include

Please see the portion the error

vhdf5_base.o: In function `vhdf5_base_mp_vh5_start_':
vhdf5_base.f90:(.text+0x46): undefined reference to `h5lib_mp_h5open_f_'
vhdf5_base.f90:(.text+0x52): undefined reference to `h5global_mp_h5p_link_create_f_'
vhdf5_base.f90:(.text+0x60): undefined reference to `h5p_mp_h5pcreate_f_'
vhdf5_base.f90:(.text+0x7a): undefined reference to `h5p_mp_h5pset_create_inter_group_f_'
vhdf5_base.o: In function `vhdf5_base_mp_vh5_end_':
vhdf5_base.f90:(.text+0x96): undefined reference to `h5lib_mp_h5close_f_'

Can you help me out
Thank you

martin.schlipf
Global Moderator
Global Moderator
Posts: 341
Joined: Fri Nov 08, 2019 7:18 am

Re: Error in vaspout.h5

#3 Post by martin.schlipf » Wed Jan 25, 2023 7:46 am

I expect that if you run

Code: Select all

ldd bin/vasp_std
in your VASP directory, you will see something like

Code: Select all

libhdf5.so => not found
among the list of linked libraries.

If that is the case then you need to set your LD_LIBRARY_PATH to include the path to your libhdf5.

If the error happens already during the linking step in the compilation then your HDF5_ROOT is not set appropriately.

Sherif_Yehia1
Newbie
Newbie
Posts: 6
Joined: Wed Aug 24, 2022 5:36 pm

Re: Error in vaspout.h5

#4 Post by Sherif_Yehia1 » Wed Jan 25, 2023 6:24 pm

Thank for your quick answer

As you advice

[sherifyehia@192 vasp.6.3.2]$ ldd bin/vasp_std
linux-vdso.so.1 (0x00007ffcb7777000)
libmkl_intel_lp64.so.2 => /opt/intel/oneapi/mkl/2023.0.0/lib/intel64/libmkl_intel_lp64.so.2 (0x00007f3b3098e000)
libmkl_intel_thread.so.2 => /opt/intel/oneapi/mkl/2023.0.0/lib/intel64/libmkl_intel_thread.so.2 (0x00007f3b2d1f5000)
libmkl_core.so.2 => /opt/intel/oneapi/mkl/2023.0.0/lib/intel64/libmkl_core.so.2 (0x00007f3b28e13000)
libiomp5.so => /opt/intel/oneapi/compiler/2023.0.0/linux/compiler/lib/intel64_lin/libiomp5.so (0x00007f3b289cd000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f3b28638000)
libmkl_scalapack_lp64.so.2 => /opt/intel/oneapi/mkl/2023.0.0/lib/intel64/libmkl_scalapack_lp64.so.2 (0x00007f3b27f0b000)
libmkl_blacs_intelmpi_lp64.so.2 => /opt/intel/oneapi/mkl/2023.0.0/lib/intel64/libmkl_blacs_intelmpi_lp64.so.2 (0x00007f3b31d8d000)
libm.so.6 => /lib64/libm.so.6 (0x00007f3b27b89000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f3b27985000)
libmpifort.so.12 => /opt/intel/oneapi/mpi/2021.8.0/lib/libmpifort.so.12 (0x00007f3b275d1000)
libmpi.so.12 => /opt/intel/oneapi/mpi/2021.8.0/lib/release/libmpi.so.12 (0x00007f3b25cb4000)
librt.so.1 => /lib64/librt.so.1 (0x00007f3b25aac000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3b2588c000)
libc.so.6 => /lib64/libc.so.6 (0x00007f3b254c7000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3b252af000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3b31bba000)

Could you help me to point my mistake

Thanks very much

martin.schlipf
Global Moderator
Global Moderator
Posts: 341
Joined: Fri Nov 08, 2019 7:18 am

Re: Error in vaspout.h5

#5 Post by martin.schlipf » Thu Jan 26, 2023 8:20 am

Well, there is no HDF5 library on that list. Could that be an executable from a previous compilation? I suspect that you did not set the HDF5_ROOT correctly in your makefile.include.

Sherif_Yehia1
Newbie
Newbie
Posts: 6
Joined: Wed Aug 24, 2022 5:36 pm

Re: Error in vaspout.h5

#6 Post by Sherif_Yehia1 » Thu Jan 26, 2023 12:29 pm

Thanks for your reply

Kindly see below a copy of my makefile.include which gives error.
Please pay attention that when switching the option "CPP_OPTIONS+= -DVASP_HDF5" (On)
shows no error, other wise, there is error i.e. no executable file under bin.



# 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 \
-D_OPENMP

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

FC = mpiifort -qopenmp
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
VASP_TARGET_CPU ?= -march=core-avx2
FFLAGS += $(VASP_TARGET_CPU)

# Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK)
# (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl)
FCL += -qmkl
MKLROOT ?= /opt/intel/oneapi/mkl/2023.0.0/lib/intel64
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread
INCS =-I$(MKLROOT)/include/fftw

# HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
HDF5_ROOT ?= /home/sherifyehia/hdf5-1.8.14
LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran -lhdf5
INCS += -I$(HDF5_ROOT)/include

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

# For the fftlib library (hardly any benefit in combination with MKL's FFTs)
FCL = mpiifort fftlib.o -qmkl
CXX_FFTLIB = icpc -qopenmp -std=c++11 -DFFTLIB_USE_MKL -DFFTLIB_THREADSAFE
INCS_FFTLIB = -I./include -I$(MKLROOT)/include/fftw
LIBS += fftlib

martin.schlipf
Global Moderator
Global Moderator
Posts: 341
Joined: Fri Nov 08, 2019 7:18 am

Re: Error in vaspout.h5

#7 Post by martin.schlipf » Fri Jan 27, 2023 7:28 am

Here are a couple of things you can try:
  • Please check whether the directory /home/sherifyehia/hdf5-1.8.14 contains the libraries libhdf5_fortran and libhdf5. If only the former is missing you need to reconfigure the HDF5 installation to enable the Fortran library
  • Verify that no other HDF5_ROOT is defined

    Code: Select all

    env | grep HDF5
  • Start a clean installation, i.e.,

    Code: Select all

    make veryclean
    make all
  • Our recommended list of toolchains uses more recent version of the HDF5 library. Please verify the older version is compatible or upgrade to a newer version.
If none of that works, store the output of the complete build in a file and share it here.

Post Reply