google-deepmind / torch-hdf5

Torch interface to HDF5 library
Other
236 stars 126 forks source link

Require fails - Error in ffi.lua #73

Open FabbyD opened 8 years ago

FabbyD commented 8 years ago

I get the following error:

th> require 'hdf5'
...e/fabrice/torch/install/share/lua/5.1/trepl/init.lua:384: ...ome/fabrice/torch/install/share/lua/5.1/hdf5/ffi.lua:56: expected align(#) on line 579 stack traceback:
    ...e/fabrice/torch/install/share/lua/5.1/trepl/init.lua:501: in function <...e/fabrice/torch/install/share/lua/5.1/trepl/init.lua:494>
    [C]: in function 'error'
    ...e/fabrice/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'
    [string "_RESULT={require 'hdf5'}"]:1: in main chunk
    [C]: in function 'xpcall'
    ...e/fabrice/torch/install/share/lua/5.1/trepl/init.lua:652: in function 'repl'
    .../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
    [C]: ?

Running Lua 5.1 Could it be that ffi.lua needs LuaJIT? If so, how could I work around that? LuaJIT has some kind of memory limit that makes the network I am trying to run unusable.

OS:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial

Installation of torch-hdf5 is successful.

Packages related to hdf5 installed:

$ dpkg -l | grep 'hdf5'
ii  hdf5-helpers                               1.8.16+docs-4ubuntu1                                        amd64        Hierarchical Data Format 5 (HDF5) - Helper tools
ii  hdf5-tools                                 1.8.16+docs-4ubuntu1                                        amd64        Hierarchical Data Format 5 (HDF5) - Runtime tools
ii  libhdf5-10:amd64                           1.8.16+docs-4ubuntu1                                        amd64        Hierarchical Data Format 5 (HDF5) - runtime files - serial version
ii  libhdf5-cpp-11:amd64                       1.8.16+docs-4ubuntu1                                        amd64        Hierarchical Data Format 5 (HDF5) - C++ libraries
ii  libhdf5-dev                                1.8.16+docs-4ubuntu1                                        amd64        Hierarchical Data Format 5 (HDF5) - development files - serial version
ii  libhdf5-serial-dev                         1.8.16+docs-4ubuntu1                                        all          transitional dummy package
$ luarocks list
Warning: Failed loading manifest for /home/fabrice/.luarocks/lib/luarocks/rocks: /home/fabrice/.luarocks/lib/luarocks/rocks/manifest: No such file or directory

Installed rocks:
----------------

argcheck
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

audio
   0.1-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

cunn
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

cunnx
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

cutorch
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

cwrap
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

dok
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

env
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

fftw3
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

gnuplot
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

graph
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

graphicsmagick
   1.scm-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

hdf5
   0-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

image
   1.1.alpha-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

lua-cjson
   2.1devel-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

luabitop
   1.0.2-3 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

luaffi
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

luafilesystem
   1.6.3-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

nn
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

nngraph
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

nnx
   0.1-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

optim
   1.0.5-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

paths
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

penlight
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

qtlua
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

qttorch
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

signal
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

sundown
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

sys
   1.1-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

threads
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

torch
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

totem
   0-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

trepl
   scm-1 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks

xlua
   1.0-0 (installed) - /home/fabrice/torch/install/lib/luarocks/rocks
GrumpyZhou commented 7 years ago

I have the same problem here. Any solution yet??

t-li commented 6 years ago

I happen to need to load a bunch of large json files and I am suffering from the same issue on Lua5.1/5.2. For those who need to bypass LuaJIT heap limitation, might want to try torch-tds. And call collectgarbage("collect") properly as a temporary solution.