2017-05-10 121 views
1

的cutorch错误:当Torch7我想安装cutorch并得到一个错误,我不知道如何解决它安装centos7

(tf0.12.1) [[email protected] deepmask]# luarocks install cutorch 
Installing https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... 
Using https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... switching to 'build' mode 
Cloning into 'cutorch'... 
remote: Counting objects: 227, done. 
remote: Compressing objects: 100% (180/180), done. 
remote: Total 227 (delta 64), reused 91 (delta 45), pack-reused 0 
Receiving objects: 100% (227/227), 234.16 KiB | 0 bytes/s, done. 
Resolving deltas: 100% (64/64), done. 
Warning: unmatched variable LUALIB 

jopts=$(getconf _NPROCESSORS_CONF) 

…… 

[ 81%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/./THC_generated_THCTensorMaskedDouble.cu.o 
Scanning dependencies of target THC 
[ 82%] [ 84%] [ 85%] [ 86%] [ 87%] [ 88%] [ 89%] [ 90%] [ 92%] Building CXX object lib/THC/CMakeFiles/THC.dir/THCCachingAllocator.cpp.o 
Building CXX object lib/THC/CMakeFiles/THC.dir/THCCachingHostAllocator.cpp.o 
Building C object lib/THC/CMakeFiles/THC.dir/THCGeneral.c.o 
Building C object lib/THC/CMakeFiles/THC.dir/THCStorageCopy.c.o 
Building C object lib/THC/CMakeFiles/THC.dir/THCTensor.c.o 
Building C object lib/THC/CMakeFiles/THC.dir/THCTensorCopy.c.o 
Building CXX object lib/THC/CMakeFiles/THC.dir/THCStream.cpp.o 
Building CXX object lib/THC/CMakeFiles/THC.dir/THCTensorRandom.cpp.o 
Building C object lib/THC/CMakeFiles/THC.dir/THCThreadLocal.c.o 
In file included from generic/THCTensor.c:1:0, 
       from /tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/THCGenerateAllTypes.h:17, 
       from /tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/THCTensor.c:7: 
/tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/generic/THCTensor.c: In function ‘THCudaByteTensor_newExpand’: 
/tmp/luarocks_cutorch-scm-1-4055/cutorch/lib/THC/generic/THCTensor.c:304:3: error: implicit declaration of function ‘THLongStorage_calculateExpandGeometry’ [-Werror=implicit-function-declaration] 
    THLongStorage_calculateExpandGeometry(tensor->size, 
^
cc1: some warnings being treated as errors 
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THCTensor.c.o] Error 1 
make[2]: *** Waiting for unfinished jobs.... 
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2 
make: *** [all] Error 2 

Error: Build error: Failed building. 
(tf0.12.1) [[email protected] deepmask]# lspci | grep -i 'vga\|3d\|2d' 
02:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1) 
03:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1) 
06:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 30) 
83:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1) 
84:00.0 3D controller: NVIDIA Corporation GM200GL [Tesla M40] (rev a1) 

我有安装cude 8.0和cudnn。我还可以成功安装其他软件包,如nnx,optim,inn。

回答

2

我也遇到过这个。原因是由于在火炬库中有一个新方法,请参阅:https://github.com/torch/torch7/blob/master/lib/TH/THStorage.c#L69

更新火炬通过在luarocks install cutorch之前运行luarocks install torch并且您应该很好。

+0

谢谢,它的作品!我想我可能已经安装了最新版本的torch7。永远不会注意到它应该被更新。 –

+0

没问题。如果检查依赖关系的版本并在必要时自动升级,这将更容易。 –

相关问题