Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5CPP doesn't differentiate between HDF5 CAPI versions #6

Closed
steven-varga opened this issue Oct 9, 2018 · 10 comments
Closed

H5CPP doesn't differentiate between HDF5 CAPI versions #6

steven-varga opened this issue Oct 9, 2018 · 10 comments

Comments

@steven-varga
Copy link
Owner

steven-varga commented Oct 9, 2018

using stock ubuntu 18.04LTS with minimal dependencies there are compile time errors triggered by the following HDF5 CAPI properties:
H5Pset_file_space_page_size, H5Pset_page_buffer_size, H5Pset_evict_on_close, H5Pset_mdc_image_config

how to reproduce error:

sudo apt-get install -y build-essential libhdf5-serial-dev
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo sh -c 'echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" >> /etc/apt/sources.list'
sudo apt-get update
sudo apt-get -y install clang-tools-7 llvm-7-tools libclang-7-dev
git clone https://github.com/steven-varga/h5cpp.git
git checkout ubuntu-18.04LTS
cd h5cpp && make install

note:

on dev suite: ubuntu@master.vargaconsulting.ca the the offending lines are commented out

@Blakjak88
Copy link

I am getting errors when compiling my code with H5CPP on Ubuntu 18.04.1 LTS. There is a scope problem.

||=== Build: Release in ConvolutionModelApplication (compiler: GNU GCC Compiler) ===|
/usr/local/include/h5cpp/H5Pall.hpp|132|error: H5Pset_file_space_page_size was not declared in this scope|
/usr/local/include/h5cpp/H5Pall.hpp|132|note: suggested alternative: H5Pset_file_space|
/usr/local/include/h5cpp/H5Pall.hpp|132|error: template argument 2 is invalid|
/usr/local/include/h5cpp/H5Pall.hpp|149|error: H5Pset_page_buffer_size was not declared in this scope|
/usr/local/include/h5cpp/H5Pall.hpp|149|note: suggested alternative: H5Pset_sieve_buf_size|
/usr/local/include/h5cpp/H5Pall.hpp|149|error: template argument 2 is invalid|
/usr/local/include/h5cpp/H5Pall.hpp|154|error: H5Pset_evict_on_close was not declared in this scope|
/usr/local/include/h5cpp/H5Pall.hpp|154|note: suggested alternative: H5Pset_fapl_core|
/usr/local/include/h5cpp/H5Pall.hpp|154|error: template argument 2 is invalid|
/usr/local/include/h5cpp/H5Pall.hpp|157|error: H5AC_cache_image_config_t was not declared in this scope|
/usr/local/include/h5cpp/H5Pall.hpp|157|note: suggested alternative: H5AC_cache_config_t|
/usr/local/include/h5cpp/H5Pall.hpp|157|error: template argument 2 is invalid|
/usr/local/include/h5cpp/H5Pall.hpp|157|error: H5Pset_mdc_image_config was not declared in this scope|
/usr/local/include/h5cpp/H5Pall.hpp|157|note: suggested alternative: H5Pset_mdc_config|
/usr/local/include/h5cpp/H5Pall.hpp|157|error: template argument 1 is invalid|
/usr/local/include/h5cpp/H5Pall.hpp|157|error: template argument 2 is invalid|
||=== Build failed: 11 error(s), 0 warning(s) (0 minute(s), 17 second(s)) ===|

It looks very similar to the problem you are reporting above.

@steven-varga
Copy link
Owner Author

Hello,
For now the best workaround is to install the latest HDF5 library from source
On my ubuntu based Linux Mint system I do:

./configure --prefix=/usr/local --enable-hl=no && make -j4 && sudo make install

There are lot's of changes with HDF5 to make it modern as well as perform well. H5CPP is a collaboration between my consulting company and Gerd Heber from HDFGroup to provide near bare hardware throughput at low latency: both parallel and serial. To achieve that H5CPP relies on newly or not yet published HDF5 routines.
hope it helps,
steven

@Blakjak88
Copy link

That did the trick!

Thx,
David

@eudoxos
Copy link

eudoxos commented May 16, 2019

Does it make sense to comment out offending lines and create pull requests? I am using libhdf5 1.10.0 (latest is 1.10.5) and would strongly prefer to use the system version (Ubuntu 18.04). Are the new features such that h5cpp is impossible, or only the new features will be missing in the wrapper?

@steven-varga
Copy link
Owner Author

Can you please try: commit 1734913 Date: Wed Jan 23 23:28:59 2019 -0500
or
commit 30d2ccf
Author: steven varga steven@vargaconsulting.ca
Date: Sun Dec 23 13:07:00 2018 -050

and let me know if that worked, so I can tag it.

@g-bull
Copy link

g-bull commented Oct 4, 2019

I suppose this is a similar problem?
... /include/h5cpp/H5Pall.hpp:142:93: error: ‘H5Pset_file_space_page_size’ was not declared in this scope using file_space_page_size = impl::fcpl_call< impl::fcpl_args<hid_t,hsize_t>, H5Pset_file_space_page_size>;
This is h5cpp master commit be0a191 (cloned 20190930) using CentOS7 with hdf5 1.10.5 built using
./configure --prefix=/.../hdf5/1.10.5-no-cpp --with-zlib=yes --enable-build-mode=production --enable-hl=no

@steven-varga
Copy link
Owner Author

Hi,
yes; it is marked as 1.10 feature Did you check --with-default-api-version=(v16|v18|v110) is set to v110? As an alternative just comment it out in the header file: there should be only a single reference to the function call.

@g-bull
Copy link

g-bull commented Oct 6, 2019

Oh thanks! I missed the --with-default-api-version (sorry, obviously I didn't rtfm properly) .
Could you use the defines in the hdf5 include files to control this (so users have to try harder to mess it up :-) )?

H5pubconf.h:#define H5_VERSION "1.10.5"
H5public.h:#define H5_VERS_MAJOR        1       /* For major interface/format changes        */
H5public.h:#define H5_VERS_MINOR        10      /* For minor interface/format changes        */

@steven-varga
Copy link
Owner Author

Yes of course, that is the idea!
I am working on a feature update: full STL + sparse matrix support; more detailed documentation, ... And will eliminate this and some other version related issues. To give you an example, the h5::append depends on H5Owrite_chunk and H5Oread_chunk calls which are available from v1.10.2. As it looks for full functionality you at least need this version.

@steven-varga
Copy link
Owner Author

Update 2019-Oct-09:
Property lists are CAPI version sensitive with limited tweak granularity, from HDF5 CAPI v1.8.16.

Example implementation:

H5Pall.hpp and H5Pdapl.hpp
...
#if H5_VERSION_GE(1,10,0)
using layout                   = impl::dcpl_call< impl::dcpl_args<hid_t,H5D_layout_t>,H5Pset_layout>;
using chunk_opts               = impl::dcpl_call< impl::dcpl_args<hid_t,unsigned>,H5Pset_chunk_opts>;
#endif
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants