在nsight eclipse上没有检测到cuda兼容设备。为什么?

时间:2015-06-02 15:26:44

标签: cuda fft nsight cufft

我正在用cufft cuda库编写一个简单的快速傅里叶变换代码。我的源文件与windows7中的visual studio兼容,但是在ubuntu 14.04中使用eclipse nsight,不行! 我安装了nvidia 346.72驱动程序和cuda toolkit 7.0,我的视频硬件是geforce 410M。当我构建我的源代码时,我有以下消息:

16:56:24 **** Incremental Build of configuration Debug for project cufft_double ****
make all 
Building target: cufft_double
Invoking: NVCC Linker
/usr/local/cuda-7.0/bin/nvcc --cudart static -L/usr/local/cuda-7.0/lib64 --relocatable-device-code=false -gencode arch=compute_20,code=compute_20 -gencode arch=compute_20,code=sm_20 -m64 -link -o  "cufft_double"  ./cufft_double.o   
./cufft_double.o: In function `main':
/home/marco/cuda-workspace/cufft_double/Debug/../cufft_double.cu:79: undefined reference to `cufftPlan1d'
/home/marco/cuda-workspace/cufft_double/Debug/../cufft_double.cu:85: undefined reference to `cufftExecZ2Z'
/home/marco/cuda-workspace/cufft_double/Debug/../cufft_double.cu:108: undefined reference to `cufftDestroy'
/home/marco/cuda-workspace/cufft_double/Debug/../cufft_double.cu:111: undefined reference to `cufftPlan1d'
/home/marco/cuda-workspace/cufft_double/Debug/../cufft_double.cu:117: undefined reference to `cufftExecZ2Z'
/home/marco/cuda-workspace/cufft_double/Debug/../cufft_double.cu:136: undefined reference to `cufftDestroy'
collect2: error: ld returned 1 exit status
make: *** [cufft_double] Error 1

16:56:27 Build Finished (took 2s.792ms)

我试图设置库路径,但在首选项窗口中,我读到“未检测到CUDA兼容设备” 请帮我! 最好的reg 马可

现在我可以构建源代码,但我的程序不起作用!

我读了这个错误: modprobe:错误:无法插入'nvidia_331_uvm':参数无效

如果“cudaGetLastError()!= cudaSuccess”,我收到一条由我编程的消息 在“cudaMalloc”之后 为了获得最佳说明,我为这段代码阅读了“ cuda error:allocazione fallita ”:

cudaMalloc((void**)&out_device, sizeof(cufftDoubleComplex)*NX*BATCH);
if (cudaGetLastError() != cudaSuccess){
    printf("Cuda error: allocazione fallita\n");
    return 0;
};

1 个答案:

答案 0 :(得分:1)

按顺序运行这些命令:

  • sudo apt-get remove --purge nvidia-*

  • sudo apt-get install cuda-drivers

  • sudo apt-get install nvidia-nsight

    重新启动计算机并打开nsight并查看属性是否显示检测到的驱动程序。