cudaErrorNoDevice GTS250 gentoo

时间:2011-04-03 13:24:24

标签: cuda nvidia gentoo

第一个问题是
cudaGetDeviceCount返回 cudaErrorNoDevice
 这表示安装的CUDA驱动程序未检测到支持CUDA的设备。

cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86 Kernel Module  260.19.26  Sun Nov 28 22:38:24 PST 2010
GCC version:  gcc version 4.4.5 (Gentoo 4.4.5 p1.2, pie-0.4.5) 

lspci -v

...
02:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce GTS 250] (rev a2) (prog-if 00 [VGA controller])
    Flags: bus master, fast devsel, latency 0, IRQ 19
    Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f8000000 (64-bit, non-prefetchable) [size=32M]
    I/O ports at ec00 [size=128]
    [virtual] Expansion ROM at fafe0000 [disabled] [size=128K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Capabilities: [100] Virtual Channel <?>
    Capabilities: [128] Power Budgeting <?>
    Capabilities: [600] Vendor Specific Information <?>
    Kernel driver in use: nvidia
    Kernel modules: nvidia
 ...

nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2010 NVIDIA Corporation
Built on Wed_Nov__3_16:14:08_PDT_2010
Cuda compilation tools, release 3.2, V0.2.1221

CUDA计算SDK 3.2.16

当我尝试制作sdk样本时,我得到第二个问题

make[1]: Entering directory `/home/style/NVIDIA_GPU_Computing_SDK/C/src/MersenneTwister'
nvcc fatal   : Unsupported gpu architecture 'compute_20'

i've tried to edit common.mk, but i don't know what exactly i should edit

感谢您的帮助

3 个答案:

答案 0 :(得分:1)

验证您是否有/ dev / nvidia0。如果不这样做,则可能需要重新启动X.

答案 1 :(得分:0)

我没有看到它说你没有CUDA设备的错误。

回答你的第二个问题:

GeForce GTS 250支持CUDA 1.1而非2.0。您需要编辑编译标志以将compute_20替换为compute_11。

答案 2 :(得分:0)

由于我遇到了同样的问题,唯一对我有用的解决方案是重新安装驱动程序。请注意,驱动程序未包含在SDK中。