我的機器上安裝了CUDA 7.5,並按照說明here安裝了Torch。在安裝Torch之前,我將CMake升級到版本3.2.x.x.然後,我用下面的命令安裝cutorch
和cunn
:無法在Torch中導入(需要)'cutorch'
luarocks install cutorch
luarocks install cunn
在安裝cutorch我看到一些消息說say8ing CUDA 7.5在我的機器上找到。然而,我無法用require 'cotorch
導入cutorch
並得到以下錯誤,當我嘗試使用在終端中炬(TH)解釋器來運行它:
THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-8316/cutorch/lib/THC/THCGeneral.c line=17 error=30 : unknown error
/home/amir/torch/install/share/lua/5.1/trepl/init.lua:384: cuda runtime error (30) : unknown error at /tmp/luarocks_cutorch-scm-1-8316/cutorch/lib/THC/THCGeneral.c:17
stack traceback:
[C]: in function 'error'
/home/amir/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'
/home/amir/torch/install/share/lua/5.1/trepl/init.lua:651: in function 'repl'
...amir/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
[C]: at 0x00406670
然後我跟着指示here才能夠使用Eclipse編寫Lua/Torch代碼。在那裏,我試圖執行require 'cutorch'
當出現以下錯誤:但
qlua: /home/amir/torch/install/share/lua/5.1/cutorch/init.lua:2: cannot load '/home/amir/torch/install/lib/lua/5.1/libcutorch.so'
stack traceback:
[C]: at 0x7f05cf9709e0
[C]: in function 'require'
/home/amir/torch/install/share/lua/5.1/cutorch/init.lua:2: in main chunk
[C]: in function 'require'
/home/amir/workspace/test/src/main.lua:2: in function 'main'
/home/amir/workspace/test/src/main.lua:6: in main chunk
這是文件libcutorch.so
是在提到目錄。 This也沒有幫我解決這個問題。有誰知道我應該着手解決這個問題嗎?
當我進入luarocks list
我得到如下:
Installed rocks:
----------------
argcheck
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
cudnn
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
cunn
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
cunnx
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
cutorch
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
cwrap
scm-1 (installed) - /home/amir/.luarocks/lib/luarocks/rocks
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
dok
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
env
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
fftw3
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
gnuplot
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
graph
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
graphicsmagick
1.scm-0 (installed) - /home/amir/torch/install/lib/luarocks/rocks
image
1.1.alpha-0 (installed) - /home/amir/torch/install/lib/luarocks/rocks
lbase64
20120820-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
lua-cjson
2.1devel-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
luaffi
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
luafilesystem
1.6.3-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
luasocket
3.0rc1-2 (installed) - /home/amir/torch/install/lib/luarocks/rocks
nn
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
nngraph
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
nnx
0.1-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
optim
1.0.5-0 (installed) - /home/amir/torch/install/lib/luarocks/rocks
paths
scm-1 (installed) - /home/amir/.luarocks/lib/luarocks/rocks
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
penlight
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
qtlua
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
qttorch
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
signal
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
sundown
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
sys
1.1-0 (installed) - /home/amir/torch/install/lib/luarocks/rocks
threads
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
torch
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
trepl
scm-1 (installed) - /home/amir/torch/install/lib/luarocks/rocks
xlua
1.0-0 (installed) - /home/amir/torch/install/lib/luarocks/rocks
做'LDD /家庭/阿米爾/手電筒/在終端安裝/ lib中/ LUA/5.1/libcutorch.so',看看它是否被正確鏈接到所有如果它的依賴。 – siavashk
@siavashk看起來這是正確地鏈接到所有的依賴關係。當我運行命令時,我得到的東西像'libluaT.so => /home/amir/torch/install/lib/libluaT.so(0x00007fd568c94000)' – Amir