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

Error with cunn and cutorch #164

Open
ghost opened this issue Mar 8, 2016 · 11 comments
Open

Error with cunn and cutorch #164

ghost opened this issue Mar 8, 2016 · 11 comments

Comments

@ghost
Copy link

ghost commented Mar 8, 2016

I followed all the steps and it worked perfect until I installed backend for torch. After installing cunn and cutorch, if I do
th -e "require 'cutorch'; require 'cunn'; print(cutorch)"
I get,
faiz@fizz:~/neural-style$ th -e "require 'cutorch'; require 'cunn'; print(cutorch)" /home/faiz/torch/install/share/lua/5.1/trepl/init.lua:384: /home/faiz/torch/install/share/lua/5.1/trepl/init.lua:384: /home/faiz/torch/install/share/lua/5.1/cutorch/test.lua:7: attempt to call field 'TestSuite' (a nil value) faiz@fizz:~/neural-style$

@timeemit
Copy link

timeemit commented Mar 9, 2016

Also receiving this exact error!

@timeemit
Copy link

timeemit commented Mar 9, 2016

Sorry, I got a little excited to see someone else with the same issue.
Let me elaborate somewhat on the exact technical specs:

Running on AWS EC2 Amazon Linux AMI 2015.09.2 x86_64 Graphics HVM EBS.

Working off of torch at this commit

With the following LuaRocks:

  • loadcaffe
  • cutorch
  • cunn
  • cudnn

All on this commit of Neural-Style

Also, the version of CUDA installed on the system is V6.5.12

@ghost
Copy link
Author

ghost commented Mar 10, 2016

I tried fresh install, still problem erupts after installing CUDA backend for torch. :(
I'm impatient to get this working!

@ghost
Copy link
Author

ghost commented Mar 12, 2016

@jcjohnson @htoyryla any insights you'd like to share?

@jcjohnson
Copy link
Owner

I actually had this problem recently; a fresh install of all the core torch packages fixed it for me:

luarocks install torch
luarocks install cutorch
luarocks install nn
luarocks install cunn

@ghost
Copy link
Author

ghost commented Mar 12, 2016

@jcjohnson Thanks! I'll give it a third try. Also, the only way I can install Nvidia drivers without getting a black screen is if I install restricted driver (v340.96) using the "additional drivers" in Ubuntu. But when I install CUDA, it automatically installs a more recent version of the drivers (something like 352). It surely will cause problems. I was thinking of how can I just install CUDA?
I have Nvidia GeForce 710M, and on the Nvidia's website, it's mentioned that the correct version of the drivers for GeForce 6 & 7 series is 304.131 As my computer faces freezing issues once I install the restricted drivers, I was thinking of installing the correct version using this PPA: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

@mattyd2
Copy link

mattyd2 commented Mar 25, 2016

@jcjohnson I've been confronting the issue above and ran:

Environment:

  1. OSX10.11
  2. Xcode 6.2 to be compatible with CUDA 7.5.20
  3. CUDA 7.5.20
  4. cmake 3.5.0
luarocks install torch
luarocks install cutorch

Which sends be back to ./update.sh and then run ./install.sh

Then I'm back to

th> require "cutorch" ...s/matthewdunn/torch/install/share/lua/5.1/trepl/init.lua:384: ...matthewdunn/torch/install/share/lua/5.1/cutorch/init.lua:2: cannot load '/Users/matthewdunn/torch/install/lib/lua/5.1/libcutorch.so' stack traceback: [C]: in function 'error' ...s/matthewdunn/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require' [string "_RESULT={require "cutorch"}"]:1: in main chunk [C]: in function 'xpcall' ...s/matthewdunn/torch/install/share/lua/5.1/trepl/init.lua:651: in function 'repl' ...dunn/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk [C]: at 0x01063231d0 [0.0041s] th>

If you have any insight I'd be incredibly thankful as I've been trying to solve this for two weeks and there are several issues open https://github.com/torch/cutorch/issues if you any insight on how to resolve them.

Thanks,

@aseembits93
Copy link

How can I set up cudnn.torch to work with cudnn v3? luarocks install cudnn would work with cudnn v4 if I am not wrong?

@Cadene
Copy link

Cadene commented May 18, 2016

@aseembits93 you build the right version of cudnn as follow

git clone https://github.com/soumith/cudnn.torch.git --branch R2
cd cudnn.torch
git branch # display *R2
luarocks remove cudnn # optional
luarocks make

Don't forget to update your LD_LIBRARY_PATH to link to your downloaded version of NVIDIA CUDNN using export (not the torch one, but the one on Nvidia website).

@andoum
Copy link

andoum commented Jul 6, 2016

For me a fresh install solved the issue, but I also had to clear the package folders in my ~/.luarocks directory before reinstalling, following the comment: torch/distro#85 (comment)

@panfengli
Copy link

panfengli commented Feb 21, 2017

Try sudo bash ./torch/update.sh

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

7 participants