【问题标题】:Cannot compile in release mode in Nvidia Nsight Eclipse edition无法在 Nvidia Nsight Eclipse 版本中以发布模式编译
【发布时间】:2014-07-04 21:11:13
【问题描述】:

我正在尝试在发布模式下编译我的 CUDA/C++ 程序,但出现以下错误:

    make all 
Building file: ../matching.cu
Invoking: NVCC Compiler
nvcc -O3 -gencode arch=compute_30,code=sm_30 -odir "" -M -o "matching.d" "../matching.cu"
nvcc --compile -O3 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_30,code=sm_30  -x cu -o  "matching.o" "../matching.cu"
/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1015): error: identifier "__builtin_ia32_vec_set_v4hi" is undefined

/usr/lib/gcc/x86_64-linux-gnu/4.6/include/xmmintrin.h(1116): error: identifier "__builtin_ia32_pshufw" is undefined

/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1312): error: identifier "__builtin_ia32_vec_ext_v8hi" is undefined

/usr/lib/gcc/x86_64-linux-gnu/4.6/include/emmintrin.h(1318): error: identifier "__builtin_ia32_vec_set_v8hi" is undefined

../matching.cu(104): warning: variable "device" is used before its value is set

../matching.cu(209): warning: variable "min" was declared but never referenced

4 errors detected in the compilation of "/tmp/tmpxft_00000af7_00000000-6_matching.cpp1.ii".
make: *** [matching.o] Error 2

**** Build Finished ****

你们知道这些消息的原因是什么吗?谢谢。

我在 Ubuntu 14.04 LTS 中使用带有 CUDA 工具包 5.0 的 NVIDIA Nsight eclipse 版本。

【问题讨论】:

  • Ubuntu 14.04 LTS 不是官方支持的 CUDA 工具包 5.0 平台。官方支持的平台列在 doc 目录的发行说明中。无论您编译哪些文件,您是否都会收到这样的错误(来自 xmmintrin.h 和 emmintrin.h)?也许您应该显示matching.cu 中包含哪些文件
  • 这些是我包含的文件:#include <iostream> #include <cstdio> #include <cmath> #include <iomanip> #include <thrust/sort.h> #include <thrust/host_vector.h> #include <thrust/device_vector.h>
  • 如果你用这些包含文件和一个空的 main 函数编译一个文件会发生什么?如果您仍然遇到相同的错误,我建议您切换到受支持的平台。
  • 空主函数也有同样的问题。我认为平台确实导致了这种情况。基本上,ubuntu 11.10 - 12.04 支持 CUDA 工具包 5.0。可以降级ubuntu吗?顺便说一句,我无法切换到更新版本的 CUDA(5.5 或 6.0),因为 5.0 仍然是与我的 nvidia 驱动程序 304 兼容的最新版本(由于我的硬件设置,我无法升级..)
  • 我不知道如何降级 Ubuntu。您当然可以重新安装所需的 Ubuntu 版本。

标签: c++ cuda


【解决方案1】:

我的问题解决了。这是因为 Ubuntu 14.04 LTS 不支持 CUDA 工具包 5.0。我已经更改了我的硬件(较新的显卡),以便能够升级我的 NVIDIA 驱动程序,这允许我安装 CUDA takeit 6.0(目前尚未在 14.04 中正式支持,但具有更好的兼容性)

【讨论】:

  • 其实 14.04 也是not officially supported by CUDA 6
  • 确实,它不受官方支持,但由于 14.04 是 LTS,它不会持续存在。我的意思是它与 CUDA 6.0 比与 CUDA 5.0 更兼容。
猜你喜欢
  • 2012-05-25
  • 2017-04-25
  • 2017-11-19
  • 1970-01-01
  • 2011-09-18
  • 1970-01-01
  • 2012-06-20
  • 2016-12-17
  • 2013-01-30
相关资源
最近更新 更多