Page 1 of 1
HDF5 linking problems
Posted: Wed Feb 19, 2025 10:12 am
by paulfons
I have successfully link and tested vasp 6.5.0 without an additional libraries. I downloaded hdf5-1.14.3 compiled it (using the same intel oneapi compilers as I used for the vasp compilation). The installation passed the internal HDF tests. I installed the HDF binaries to a local directory and attempted to link to it and encountered the following error. Might you have an idea what the problem is?
lhdf5_fortran -L/data/Software/wannier90/lib -lwannier
ld: /data/Software/HDF/hdf5-1.14.3/hdf5/lib/libhdf5_fortran.so: undefined reference to `H5Pget_actual_selection_io_mode'
The relevant lines in the makefile.include are
# HDF5-support (optional but strongly recommended, and mandatory for some features)
CPP_OPTIONS+= -DVASP_HDF5
HDF5_ROOT ?= /data/Software/HDF/hdf5-1.14.3/hdf5
LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
INCS += -I$(HDF5_ROOT)/include
Re: HDF5 linking problems
Posted: Wed Feb 19, 2025 10:47 am
by manuel_engel1
Hello again 
The section in the makefile.include looks correct. However, I'm a bit confused from the error message you show. This seems to relate to wannier90. Could you please attach a complete output/error log?
Re: HDF5 linking problems
Posted: Thu Feb 20, 2025 1:29 am
by paulfons
Hi Manuel,
I am afraid I clipped the output slightly. The top line was the last line of the link command and included wannier90 which apparently linked without problem.
I have attached the output from make (nohup.out) and the makefile.include for reference. As you can see from the makefile, I am attempting to link hdf5-1.14.3 to Vasp. The standalone tests for hdf5 in the hdf5-1.14.3 folder completed without error and the binaries/includes are in the directory: /data/Software/HDF/hdf5-1.14.3/hdf5.
Thanks for your help. Vasp works fine without hdf5 support, but it would be nice to have it as hdf5 support appears to becoming more important.
ls -l /data/Software/HDF/hdf5-1.14.3/hdf5/
total 12
drwxr-xr-x 2 paulfons matstud 4096 Feb 19 17:31 bin
drwxr-xr-x 2 paulfons matstud 4096 Feb 19 17:31 include
drwxr-xr-x 2 paulfons matstud 4096 Feb 19 17:32 lib
drwxr-xr-x 3 paulfons matstud 35 Feb 16 2024 share
Re: HDF5 linking problems
Posted: Thu Feb 20, 2025 8:35 am
by paulfons
Please find attached the makefile.include and the log (nohup.out) for attempting to link with hdf5-1.14.3.
Re: HDF5 linking problems
Posted: Fri Feb 21, 2025 2:40 pm
by manuel_engel1
Thank you for providing the additional information. The build output shows many linking errors that are related to scaLAPACK, but I guess you have already taken care of those judging by your most recent posts.
The linking error related to HDF5 is something that pertains the HDF5 installation. The shared-object file libhdf5_fortran.so, which is part of HDF5, tries to call a routine H5Pget_actual_selection_io_mode that exists also within the HDF5 library. This seems to suggest that there something wrong with your environment. Have you tried adding the library path of your HDF5 installation to PATH?