【问题标题】:An error when install cutorch in Torch7 of centos7centos7的torch7安装cutorch时出错
【发布时间】:2017-05-11 04:05:40
【问题描述】:

我想安装手电筒报错不知道怎么解决:

(tf0.12.1) [root@sd-bigdata-gpu-02 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) [root@sd-bigdata-gpu-02 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。

【问题讨论】:

    标签: installation packages torch


    【解决方案1】:

    我也遇到过。原因是由于torch lib中的一个新方法,见:https://github.com/torch/torch7/blob/master/lib/TH/THStorage.c#L69

    通过在luarocks install cutorch 之前运行luarocks install torch 来更新Torch,您应该一切顺利。

    【讨论】:

    • 谢谢,它有效!我想我可能已经为最新版本安装了 torch7。并且永远不会注意到它应该被更新。
    • 没问题。如果检查依赖的版本并在必要时自动升级,这会更容易。
    猜你喜欢
    • 2021-08-14
    • 2015-06-17
    • 2022-09-30
    • 2023-04-02
    • 2015-09-19
    • 2017-09-19
    • 2023-03-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多