You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just finished setting up h5cpp and I'm trying the examples on this page.
The basics.cpp example seems to work fine, but I cannot get the eigen3.cpp example to work. I get HDF5 errors unfortunately.
This is what happens if I run the example as-is:
HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 140505354843968:
#000: ../../../src/H5Dio.c line 336 in H5Dwrite(): can't write data
major: Dataset
minor: Write failed
#001: ../../../src/H5Dio.c line 683 in H5D__write(): unable to set up type info
major: Dataset
minor: Unable to initialize object
#002: ../../../src/H5Dio.c line 968 in H5D__typeinfo_init(): not a datatype
major: Invalid arguments to routine
minor: Inappropriate type
terminate called after throwing an instance of 'h5::error::io::dataset::write'
what(): /home/svalorzen/Tests/cpp/h5/h5cpp/h5cpp/H5Dwrite.hpp line# 27 : couldn't write dataset...
Aborted (core dumped)
After this the linalg.h5 file is created, but cannot be opened with another tool.
If instead I comment most of the file, and I simply try to run the fixed/compile time examples (replacing H5F_ACC_RDWR with H5F_ACC_TRUNC, I get this:
HDF5-DIAG: Error detected in HDF5 (1.10.4) thread 140167186298688:
#000: ../../../src/H5F.c line 495 in H5Fopen(): invalid file open flags
major: Invalid arguments to routine
minor: Bad value
terminate called after throwing an instance of 'h5::error::io::file::open'
what(): /home/svalorzen/Tests/cpp/h5/h5cpp/h5cpp/H5Fopen.hpp line# 29 : opening hdf5 container failed...
Aborted (core dumped)
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4")
-- H5CPP 1.10.4.6 matches with minimum required HDF5 v1.10.4
-- Found MPI_C: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-- Install directory: /usr/local/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/svalorzen/Tests/cpp/h5/build
Any ideas what I'm doing wrong?
The text was updated successfully, but these errors were encountered:
Thanks for the report: I could replicate the issue.
My suggestion is to clone this repository then git checkout v1.10.4-6; I also installed eigen 3.3.7-2 with sudo apt install libeigen3-dev on an ubuntu 20.04LTS based linux mint. The Unix makefile expects Eigen3 in /usr/include/eigen3 which can be adjusted to your system. Running make eigen3 from examples/linalg did the right thing.
Alternatively from the h5cpp/examples directory run cmake . && make to compile the examples, then run ./examples-eigen3
Let me know either here or on the HDF5 C++ forum if the above solved the problem.
best: steve
I've just finished setting up h5cpp and I'm trying the examples on this page.
The
basics.cpp
example seems to work fine, but I cannot get theeigen3.cpp
example to work. I get HDF5 errors unfortunately.This is what happens if I run the example as-is:
After this the linalg.h5 file is created, but cannot be opened with another tool.
If instead I comment most of the file, and I simply try to run the fixed/compile time examples (replacing
H5F_ACC_RDWR
withH5F_ACC_TRUNC
, I get this:This is my CMake setup:
and CMake output:
Any ideas what I'm doing wrong?
The text was updated successfully, but these errors were encountered: