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

run_gpu: module 'cutorch' not found #5

Open
190n opened this issue Aug 30, 2015 · 13 comments
Open

run_gpu: module 'cutorch' not found #5

190n opened this issue Aug 30, 2015 · 13 comments

Comments

@190n
Copy link

190n commented Aug 30, 2015

When I try to run a game on the GPU, I get the following output:

$ ./run_gpu breakout
-framework alewrap -game_path /home/ben/Downloads/DeepMind-Atari-Deep-Q-Learner-master/roms/ -name DQN3_0_1_breakout_FULL_Y -env breakout -env_params useRGB=true -agent NeuralQLearner -agent_params lr=0.00025,ep=1,ep_end=0.1,ep_endt=replay_memory,discount=0.99,hist_len=4,learn_start=50000,replay_memory=1000000,update_freq=4,n_replay=1,network="convnet_atari3",preproc="net_downsample_2x_full_y",state_dim=7056,minibatch_size=32,rescale_r=1,ncols=1,bufferSize=512,valid_size=500,target_q=10000,clip_delta=1,min_reward=-1,max_reward=1 -steps 50000000 -eval_freq 250000 -eval_steps 125000 -prog_freq 10000 -save_freq 125000 -actrep 4 -gpu 0 -random_starts 30 -pool_frms type="max",size=2 -seed 1 -threads 4
Fontconfig error: "/home/ben/.config/font-manager/local.conf", line 2: syntax error
Gtk-Message: Failed to load module "canberra-gtk-module"
Torch Threads:  4
qlua: ./initenv.lua:58: module 'cutorch' not found:
    no field package.preload['cutorch']
    no file './cutorch.lua'
    no file '/home/ben/Downloads/DeepMind-Atari-Deep-Q-Learner-master/torch/share/luajit-2.0.3/cutorch.lua'
    no file '/usr/local/share/lua/5.1/cutorch.lua'
    no file '/usr/local/share/lua/5.1/cutorch/init.lua'
    no file '/home/ben/Downloads/DeepMind-Atari-Deep-Q-Learner-master/torch/share/lua/5.1/cutorch.lua'
    no file '/home/ben/Downloads/DeepMind-Atari-Deep-Q-Learner-master/torch/share/lua/5.1/cutorch/init.lua'
    no file './cutorch.so'
    no file '/usr/local/lib/lua/5.1/cutorch.so'
    no file '/home/ben/Downloads/DeepMind-Atari-Deep-Q-Learner-master/torch/lib/lua/5.1/cutorch.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
    [C]: at 0x7f0b12f8d7b0
    [C]: in function 'require'
    ./initenv.lua:58: in function 'torchSetup'
    ./initenv.lua:112: in function 'setup'
    train_agent.lua:52: in main chunk
@kuz
Copy link
Owner

kuz commented Aug 30, 2015

This is probably because you do not have nVidia CUDA toolkit installed.

@190n
Copy link
Author

190n commented Aug 30, 2015

Thanks. Trying that now...

@190n
Copy link
Author

190n commented Aug 30, 2015

Still doesn't work.

@snapo
Copy link

snapo commented Feb 5, 2016

Problem is that luarocks install cunn and luarocks install cutorch failed on your system. (Same as on mine with ubuntu 15.10 / CUDA 7.5 ) will try to find a workaround.

--- Update ---
Problem was i did not had the same version for the c compiler and for the c++ compiler.
Second problem was i the g++ symlink in /usr/bin/ was missing after installing gcc/g++ 4.9

to build the packages this did work for me:

apt-get install g++-4.9 gcc-4.9
rm -rf /usr/bin/gcc
rm -rf /usr/bin/g++
ln -s /usr/bin/g++-4.9 /usr/bin/g++
ln -s /usr/bin/gcc-4.9 /usr/bin/gcc

now execute the install dependencies.sh again

Then if you are using a server that does commandline only open the file
%yourDQN%/dqn/train_agent.lua

comment out (--) line 98 to not use X11
So that it looks like this:
-- win =image.display({image=screen, win=win})

Hope this helps you

@drsstein
Copy link

I am having the same issue despite running both g++ and gcc with the same version (4.8.2. in my case).

@mhmtsarigul
Copy link

I have the same problem in Ubuntu 14.04. Cutorch is already installed.

qlua: ./initenv.lua:58: module 'cutorch' not found:
no field package.preload['cutorch']
no file './cutorch.lua'
no file '/home/mehmet/Desktop/DeepMind-Atari-Deep-Q-Learner-master/torch/share/luajit-2.0.4/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch/init.lua'
no file '/home/mehmet/Desktop/DeepMind-Atari-Deep-Q-Learner-master/torch/share/lua/5.1/cutorch.lua'
no file '/home/mehmet/Desktop/DeepMind-Atari-Deep-Q-Learner-master/torch/share/lua/5.1/cutorch/init.lua'
no file './cutorch.so'
no file '/usr/local/lib/lua/5.1/cutorch.so'
no file '/home/mehmet/Desktop/DeepMind-Atari-Deep-Q-Learner-master/torch/lib/lua/5.1/cutorch.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: at 0x7feabae9f9f0
[C]: in function 'require'
./initenv.lua:58: in function 'torchSetup'
./initenv.lua:112: in function 'setup'
train_agent.lua:52: in main chunk

Cutorch is in;

cutorch scm-1 is now built and installed in /home/mehmet/torch/install/ (license: BSD)

How can i make it find cutorch?

@snapo
Copy link

snapo commented Jun 3, 2016

Could you check your path variables (global and user) if you have added the cutorch path from your system?

@mhmtsarigul
Copy link

Thanks for your answer. I remove torch and cutorch then i install them
again maybe five times. But at the end it works.
There was a version problem i think because lua 5.1 comes with torch but
the application looks for 5.2.

2016-06-03 13:50 GMT+03:00 snapo notifications@github.com:

Could you check your path variables (global and user) if you have added
the cutorch path from your system?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ASxuXL1o10BTgfHiefEcW9Ed1Zm3cTGJks5qIAcOgaJpZM4F0ra-
.

@jsrimr
Copy link

jsrimr commented Jul 29, 2017

@kuz I finally solved the issue passing two weeks of agony. Thanks! I think 190n didn't just follow the instruction correctly. He should have modified the path and LD_LIBRARY_PATH. 190n, you can check whether your installation completed by running samples specified in step 6-2

@gaohaoyue
Copy link

@190n Have you resolved your problem yet? Cuz I'm having the same issue.

@gaohaoyue
Copy link

@kuz What are path and LD_LIBRARY_PATH have you modified?

@190n
Copy link
Author

190n commented Aug 25, 2017

@gaohaoyue I lost interest :/

@ghost
Copy link

ghost commented Nov 21, 2017

I had the same problem. The following solution worked for me:

apt-get install g++-4.8 gcc-4.8
rm -rf /usr/bin/gcc
rm -rf /usr/bin/g++
ln -s /usr/bin/g++-4.8 /usr/bin/g++
ln -s /usr/bin/gcc-4.8 /usr/bin/gcc

now execute the install dependencies.sh again

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