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

Unsupported HDF5 version: 1.10.0 #76

Open
jnhwkim opened this issue Aug 7, 2016 · 12 comments
Open

Unsupported HDF5 version: 1.10.0 #76

jnhwkim opened this issue Aug 7, 2016 · 12 comments

Comments

@jnhwkim
Copy link

jnhwkim commented Aug 7, 2016

It seems torch-hdf5 doesn't support 1.10.0 now.

$ th -lhdf5
could not load hdf5, skipping
/usr/local/torch/install/share/lua/5.1/hdf5/ffi.lua:71: Unsupported HDF5 version: 1.10.0
stack traceback:
    [C]: in function 'error'
    /usr/local/torch/install/share/lua/5.1/hdf5/ffi.lua:71: in function 'checkHDF5Version'
    /usr/local/torch/install/share/lua/5.1/hdf5/ffi.lua:78: in main chunk
    [C]: in function 'dofile'
    /usr/local/torch/install/share/lua/5.1/torch/init.lua:54: in function 'include'
    /usr/local/torch/install/share/lua/5.1/hdf5/init.lua:29: in main chunk
    [C]: in function 'require'
    ...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:48: in function <...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:48>
    [C]: in function 'xpcall'
    ...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:48: in main chunk
    [C]: at 0x00406670
@TimZaman
Copy link

TimZaman commented Aug 29, 2016

Duplicate. This issue was already raised in #67 and closed because they have no plans to support it. Not a valid reason to close the issue imo. I'll try to get a PR for this because this 1.10->1.8 thing is a real pita for me. Am I correct in thinking deepmind's movement to TensorFlow means the torch packages and deepmind github presence will not develop?

@rave78
Copy link

rave78 commented Sep 20, 2016

I found the following solution https://www.bountysource.com/issues/34861873-unsupported-hdf5-version. I have not tried yet.

@TimZaman
Copy link

That page does not yield a solution to the actual compatibility with a more recent version of the hdf5 library. That page just tells you to install an old version.

@cdluminate
Copy link

such a pity. Debian has transited to HDF5-1.10.

@hassanshallal
Copy link

This config.lua solved the issue in my system:

hdf5._config = {
HDF5_INCLUDE_PATH = "/Users/yourname/anaconda/pkgs/hdf5-1.8.17-1/include",
HDF5_LIBRARIES = "/Users/yourname/anaconda/pkgs/hdf5-1.8.17-1/lib/libhdf5.dylib;/usr/lib/libpthread.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib"
}

@FrenchBully
Copy link

Is there still no solution for this issue?

@hassanshallal
Copy link

hassanshallal commented Apr 6, 2017 via email

@FrenchBully
Copy link

FrenchBully commented Apr 7, 2017

Actually was able to get it working thanks, but with an older version of hdf5. Credit goes to Tom Schofield,
Steps:

  1. brew install [email protected]
  2. copy contents from usr/local/Cellar/[email protected] over to usr/local/Cellar/hdf5
  3. brew switch hdf5 1.8.18
  4. Set /usr/local/torch/install/share/lua/5.1/hdf5/config.lua
    hdf5._config = { HDF5_INCLUDE_PATH = "/usr/local/include", HDF5_LIBRARIES = "/usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib" }

@Cadene
Copy link

Cadene commented Apr 9, 2017

I solved the issue by installing a certain version of hdf5, but not the 1.10 version of hdf5.

  1. Install anaconda
  2. Create a new env : conda create -n hdf5 python=3.6
  3. Install hdf5 : conda install hdf5=1.8.17
  4. Modify torch-hdf5 config file : nano ~/torch/install/share/lua/5.1/hdf5/config.lua
    (I just added the HDF5_INCLUDE_PATH and modified the path to libhdf5.so in HDF6_LIBRARIES)
hdf5._config = {
    HDF5_INCLUDE_PATH = "/home/cadene/anaconda3/envs/hdf5/include/",
    HDF5_LIBRARIES = "/home/cadene/anaconda3/envs/hdf5/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.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"
}
  1. Try : th -e "require 'hdf5'"
  2. Dance if no error or cry and try harder

@MelomanCool
Copy link

MelomanCool commented Jan 12, 2018

There is a fork that supports 1.10: https://github.com/anibali/torch-hdf5/tree/hdf5-1.10
You can install it like so:

git clone https://github.com/anibali/torch-hdf5.git
cd torch-hdf5
git checkout hdf5-1.10 
luarocks make hdf5-0-0.rockspec

@agilebean
Copy link

Usually, installing the hdf5 bindings via luarocks is the more direct way and should work:

luarocks install https://raw.githubusercontent.com/deepmind/torch-hdf5/master/hdf5-0-0.rockspec

@Wentong-DST
Copy link

I found another way to solve this, which works for me:
First, download hdf5-1.8.18 source file
Second, use LD_LIBRARY_PATH="../hdf5-1.8.18/src" th xxx.lua when running torch scripts

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

10 participants