scanberg / viamd

Visual Interactive Analysis of Molecular Dynamics
MIT License
276 stars 28 forks source link

libhdf5 libraries in `veloxchem` branch: "HDF5 was found, but a different variable was set which contains the location of the `hdf5::hdf5` library." #82

Open DavidCdeB opened 5 days ago

DavidCdeB commented 5 days ago

Many thanks again for this excellent software and capabilities.

I've been using the master branch of VIAMD in my system (ArchLinux) for a long time and periodically updating via git pull—- recurse-submodules, and everything has worked flawlessly ever since.

I'm now trying to use the veloxchem branch as described here by following the steps:

> git checkout veloxchem
> git pull --recurse-submodules
> mkdir build_vlx # Fresh build to avoid interfering with the `build` from the master branch
> cd build_vlx
> cmake -DVIAMD_ENABLE_VELOXCHEM=ON -DMD_ENABLE_VLX=ON ..

This is the error that I get:

> cmake -DVIAMD_ENABLE_VELOXCHEM=ON -DMD_ENABLE_VLX=ON ..

CMake Warning (dev) at ext/mdlib/cmake/common.cmake:11 (enable_language):
  project() should be called prior to this enable_language() call.
Call Stack (most recent call first):
  CMakeLists.txt:3 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: /usr/lib/libOpenGL.so
-- Performing Test HAVE_AVX512_EXTENSIONS
-- Performing Test HAVE_AVX512_EXTENSIONS - Failed
-- Performing Test HAVE_AVX2_EXTENSIONS
-- Performing Test HAVE_AVX2_EXTENSIONS - Success
-- Performing Test HAVE_FMA_EXTENSIONS
-- Performing Test HAVE_FMA_EXTENSIONS - Success
-- Found HDF5: /usr/lib/libsz.so;/usr/lib/libz.so;/usr/lib/libdl.a;/usr/lib/libm.so (found version "1.14.4-3")
CMake Error at /usr/share/cmake/Modules/FindHDF5.cmake:1084 (message):
  HDF5 was found, but a different variable was set which contains the
  location of the `hdf5::hdf5` library.
Call Stack (most recent call first):
  ext/mdlib/CMakeLists.txt:150 (find_package)

-- Writing resources to gen/gl_shaders.inl
-- Writing resources to gen/gto_shaders.inl
-- mdlib: GCC configuration was used
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Including X11 support
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Writing resources to gen/shaders.inl
-- Configuring incomplete, errors occurred!

It looks like HDF5 is found, as stated in the above print; and I can also see HDF5 is indeed installed:

> pacman -Ss hdf5
extra/hdf5 1.14.4.3-1 [installed]
    General purpose library and file format for storing scientific data

However, it may not be finding the specific libraries.

A quick search in the /usr folder for hdf5-related libraries reveals:

> cd /usr
> find . -iname "libhdf5*"
find: ‘./share/hplip/base/__pycache__’: Permission denied
find: ‘./share/factory/etc/audit/plugins.d’: Permission denied
find: ‘./lib/tcl8.6/bwidget-1.9.16’: Permission denied
./lib/libhdf5_hl_cpp.so.310
./lib/libhdf5_hl_fortran.so
./lib/libhdf5.so.310.4.0
./lib/libhdf5_cpp.so.310
./lib/libhdf5.so
./lib/libhdf5hl_fortran.so.310
./lib/libhdf5_hl.so
./lib/libhdf5_hl.so.310
./lib/libhdf5_cpp.so
./lib/libhdf5_hl_cpp.so.310.0.4
./lib/libhdf5_java.so
./lib/libhdf5.settings
./lib/libhdf5hl_fortran.so
./lib/libhdf5hl_fortran.so.310.0.4
./lib/libhdf5_fortran.so.310.3.0
./lib/libhdf5_cpp.so.310.0.4
./lib/libhdf5_hl.so.310.0.4
./lib/libhdf5_fortran.so
./lib/libhdf5_hl_cpp.so
./lib/libhdf5.so.310
./lib/libhdf5_fortran.so.310

Unfortunately, I cannot find the libhdf5-serial-dev libraries as written here, neither in the official ArchLinux standard package repositories nor the AUR ones.

A quick search for "hdf5" in the AUR repos reveals this list

  1. Not sure if h5utils will be the way to go? i.e. install this package? Some libraries are listed in the description
  2. If we look carefully at the above cmake output, this might reveal much more information on what we need?

Many thanks, All the best David

scanberg commented 16 hours ago

Hey @DavidCdeB, Thanks for bringing this to my attention, and I apologize for the late reply. I'm going to be busy this week with deadlines, but I can investigate later when I get some time over. And if you come up with a solution before that, please share it.

Best, Robin