Hi everyone!
I installed torch and GPU related dependencies by running the script:
```
apt-get update
apt-get -y install sudo
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
. /root/torch/install/bin/torch-activate
apt-get update
sudo apt-get -y install libmatio-dev
~/torch/install/bin/luarocks install --server=https://luarocks.org/dev matio
sudo apt -y install nvidia-cuda-toolkit
~/torch/install/bin/luarocks install --server=https://luarocks.org/dev cutorch
git clone https://github.com/torch/cunn
cd cunn
~/torch/install/bin/luarocks make rocks/cunn-scm-1.rockspec
```
However when I try `th testcuda.lua` where `testcuda.lua` is
```
require 'torch'
require 'nn'
require 'nngraph'
require 'optim'
ok, cunn = pcall(require, 'cunn')
ok2, cutorch = pcall(require, 'cutorch')
print(ok,cunn,ok2,cutorch)
cutorch.setDevice(1)
```
The error message is
```
THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-1728/cutorch/lib/THC/THCGeneral.c line=70 error=30 : unknown error
false /root/torch/install/share/lua/5.1/trepl/init.lua:389: /root/torch/install/share/lua/5.1/trepl/init.lua:389: cuda runtime error (30) : unknown error at /tmp/luarocks_cutorch-scm-1-1728/cutorch/lib/THC/THCGeneral.c:70 false /root/torch/install/share/lua/5.1/trepl/init.lua:389: loop or previous error loading module 'cutorch'
/root/torch/install/bin/luajit: testcuda.lua:8: attempt to call field 'setDevice' (a nil value)
stack traceback:
testcuda.lua:8: in main chunk
[C]: in function 'dofile'
/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50
```
`nvidia-smi` and `nvcc -V` all work well. Anyone knows how to solve it? Thanks a bunch to any possible help :)