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

Require fails - Error in ffi.lua #73

Open
FabbyD opened this issue Jul 26, 2016 · 2 comments
Open

Require fails - Error in ffi.lua #73

FabbyD opened this issue Jul 26, 2016 · 2 comments

Comments

@FabbyD
Copy link

FabbyD commented Jul 26, 2016

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
@FabbyD FabbyD changed the title Require fails Require fails - Error in ffi.lua Jul 26, 2016
@GrumpyZhou
Copy link

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

@t-li
Copy link

t-li commented Nov 13, 2017

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.

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

3 participants