-
Notifications
You must be signed in to change notification settings - Fork 126
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
ffi.lua:56: expected align(#) on line 579 #79
Comments
I also get this problem , so I want to know does that mean I should reinstall torch use luajit? |
Yes, under luajit hdf5 works fine. I reinstalled torch with luajit |
Same as #73, is anyone aware of this problem? What if we can't use LuaJIT? |
I am having the same issue . I am working on Ubuntu 16.04 . I have lua version 5.2.3. |
@FabbyD Did you find a fix? I also have the same problem, working on Ubuntu 15.10 with Lua 5.2.3. I cannot install LuaJIT because of memory issues. |
Hmm, sadly no. Not by using Lua 5.1 atleast. I ended up using LuaJIT. I dont know what kind of memory issue you have, but it seems like most memory allocation in the torch library (mostly Tensors) are done in C which bypasses the LuaJIT's garbage collector. From what I have read, the memory limit in LuaJIT comes from its current GC. I know they are working on a new version that should get rid of this limitation (fingers crossed). Correct me if I'm wrong. |
Ah, I see. I had this memory problem long ago with LuaJIT and then used 5.2 since. I will give it a try |
If you're loading straight Lua arrays from the HDF5 file then you most probably will still have the same problem (if you load more than 2GB). |
LuaJIT made hdf5 work, but now I'm struggling to load models saved in Lua 5.2 into LuaJIT. Getting incompatible byteCodes all over the place. I guess I will get the array problem also once this fixes :( |
Any update on that issue? I would also prefer to use Lua 5.2 |
@kprimice I still don't know what fixed it. But going back to Ubuntu 14.04 with a previous version of GCC(4.8.4) and Lua 5.1 worked. Lua 5.1 does not have the memory issue, so I'm working with this for now |
lxy@lxy-Lenovo:~/neuraltalk2$ th eval.lua -model /home/lxy/model_id1-501-1448236541.t7 -image_folder /home/lxy/Flickr8k_Dataset/Flicker8k_Dataset/ -num_images 10 well, i am also meet this expected align(#) on line 579 issue when i am trying to running Andrej Karpathy's program NeuralTalk2, so thanks everyone who gives an solution about my issue. |
Lua 5.1 on Ubuntu 16 also has such a problem. I can't use LuaJIT because the memory cost of my project is larger than 4GB... |
I have the same issue on Ubuntu 16.04 using gcc-5. Following @ambarpal's suggestion, I have installed gcc/g++ 4.8 and used Lua 5.1, the above error is not happening anymore. However I still have the same memory error (both Lua 5.1 and LuaJIT give "not enough memory" with 6GB while reading 9GB H5 file (system has more than 20GB memory). |
I get a similar error despite using LuaJIT:
|
And another one on FreeBSD:
|
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. |
torch-hdf5 with lua 5.2 and gcc 4.8 can work. I think it has a relationship with version of gcc. (ps: My version of g++ is also 4.8) |
I have torch with Lua 5.2 installed on ubuntu 16.04. When I use require 'hdf5' I have got error
/root/torch/install/share/lua/5.2/hdf5/ffi.lua:56: expected align(#) on line 579
stack traceback:
/root/torch/install/share/lua/5.2/itorch/main.lua:166: in function </root/torch/install/share/lua/5.2/itorch/main.lua:159>
[C]: in function 'cdef'
/root/torch/install/share/lua/5.2/hdf5/ffi.lua:56: in function 'loadHDF5Header'
/root/torch/install/share/lua/5.2/hdf5/ffi.lua:60: in main chunk
[C]: in function 'dofile'
/root/torch/install/share/lua/5.2/torch/init.lua:54: in function 'include'
/root/torch/install/share/lua/5.2/hdf5/init.lua:29: in main chunk
[C]: in function 'require'
[string "hdf5 = require 'hdf5'..."]:1: in main chunk
[C]: in function 'xpcall'
/root/torch/install/share/lua/5.2/itorch/main.lua:209: in function </root/torch/install/share/lua/5.2/itorch/main.lua:173>
(...tail calls...)
/root/torch/install/share/lua/5.2/lzmq/poller.lua:75: in function 'poll'
/root/torch/install/share/lua/5.2/lzmq/impl/loop.lua:307: in function 'poll'
/root/torch/install/share/lua/5.2/lzmq/impl/loop.lua:325: in function 'sleep_ex'
/root/torch/install/share/lua/5.2/lzmq/impl/loop.lua:370: in function 'start'
/root/torch/install/share/lua/5.2/itorch/main.lua:381: in main chunk
[C]: in function 'require'
(command line):1: in main chunk
[C]: in ?
It seems the problem is in lua 5.2. I solved this issue when installed luajit.
The text was updated successfully, but these errors were encountered: