2014-09-10 72 views
0

我在opensuse 13.1上安装了cuda toolkit 6.5,并且在编译cuda示例时遇到问题。编译cuda示例的opensuse 13.1'

输出使之后的命令是:

〜#使

make[1]: Entering directory `/home/user/NVIDIA_CUDA-6.5_Samples/0_Simple/simpleStreams 
/usr/local/cuda-6.5/bin/nvcc -ccbin g++ -I../../common/inc -m64  -gencode arch=compute_11,code=sm_11 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -o simpleStreams.o -c simpleStreams.cu 
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release. 
g++: No such file or directory 
make[1]: *** [simpleStreams.o] Error 1 
make[1]: Leaving directory `/home/user/NVIDIA_CUDA-6.5_Samples/0_Simple/simpleStreams 
make: *** [0_Simple/simpleStreams/Makefile.ph_build] Error 2 
我NVCC和gcc的

版本:

NVCC:NVIDIA(R)Cuda的编译器驱动程序 版权所有(C )2005-2014 NVIDIA Corporation 构建于Thu_Jul_17_21:41:27_CDT_2014 Cuda汇编工具,版本6.5,V6.5.12

gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388](SUSE Linux)

有人能帮我解决这个问题吗?

回答

1

nvcc不喜欢compute_1X标志,其中X1,2,3。只需删除该代码:-gencode arch=compute_11,code=sm_11 来自Makefile的代码,您应该正确编译。尽管这只是一个警告,但建议您修复所有警告以避免麻烦。根据nvcc配置,发生警告时也可能会失败。

这个问题可能是由于它没有找到g++编译器。有可能你没有安装gcc编译器c++这是最可能的原因。或者它可能发生,你已经手动安装它,并且不在PATH上,这是不太可能的原因。

要安装gcc编译器为c++请按照此link。如果不起作用,则问题与计算机无关。