在Ubuntu上安装CUDA时出错

时间:2017-05-28 07:37:32

标签: cuda ubuntu-16.04 nvidia

我一直在按照本指南在Ubuntu上设置我的GPU(1080ti)。 https://pratos.github.io/setup-tensorflow-gpu-on-ubuntu.html

顺便说一句,昨天一切正常,但TensorFlow抱怨CUDA,这就是我决定用旧驱动程序重新安装所有内容的原因。

无论如何,我在运行deviceQuery时遇到错误:

$:~/CUDA-8.0-samples/1_Utilities/deviceQuery$ sudo ./deviceQuery 

./deviceQuery Starting...
 CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL

$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

$$ nvidia-smi -a 
==============NVSMI LOG==============

Timestamp                           : Sun May 28 03:34:57 2017
Driver Version                      : 375.26

Attached GPUs                       : 1
GPU 0000:02:00.0
    Product Name                    : Unknown Error
    Product Brand                   : GeForce
    Display Mode                    : Enabled
    Display Active                  : Enabled
    Persistence Mode                : Disabled
    Accounting Mode                 : Disabled
    Accounting Mode Buffer Size     : 1920
    Driver Model
        Current                     : N/A
        Pending                     : N/A
    Serial Number                   : 0321017005146
    GPU UUID                        : GPU-e39434b7-62f8-96a6-8731-cfad1ec78e7f
    Minor Number                    : 0
    VBIOS Version                   : 86.02.39.00.01
    MultiGPU Board                  : No
    Board ID                        : 0x200
    GPU Part Number                 : 900-1G611-0050-000
    Inforom Version
        Image Version               : G001.0000.01.04
        OEM Object                  : 1.1
        ECC Object                  : N/A
        Power Management Object     : N/A
    GPU Operation Mode
        Current                     : N/A
        Pending                     : N/A
    GPU Virtualization Mode
        Virtualization mode         : None
    PCI
        Bus                         : 0x02
        Device                      : 0x00
        Domain                      : 0x0000
        Device Id                   : 0x1B0610DE
        Bus Id                      : 0000:02:00.0
        Sub System Id               : 0x120F10DE
        GPU Link Info
            PCIe Generation
                Max                 : 3
                Current             : 1
            Link Width
                Max                 : 16x
                Current             : 16x
        Bridge Chip
            Type                    : N/A
            Firmware                : N/A
        Replays since reset         : 0
        Tx Throughput               : 17000 KB/s
        Rx Throughput               : 142000 KB/s
    Fan Speed                       : 23 %
    Performance State               : P8
    Clocks Throttle Reasons
        Idle                        : Active
        Applications Clocks Setting : Not Active
        SW Power Cap                : Not Active
        HW Slowdown                 : Not Active
        Sync Boost                  : Not Active
        Unknown                     : Not Active
    FB Memory Usage
        Total                       : 11168 MiB
        Used                        : 164 MiB
        Free                        : 11004 MiB
    BAR1 Memory Usage
        Total                       : 256 MiB
        Used                        : 5 MiB
        Free                        : 251 MiB
    Compute Mode                    : Default
    Utilization
        Gpu                         : 0 %
        Memory                      : 1 %
        Encoder                     : 0 %
        Decoder                     : 0 %
    Ecc Mode
        Current                     : N/A
        Pending                     : N/A
    ECC Errors
        Volatile
            Single Bit            
                Device Memory       : N/A
                Register File       : N/A
                L1 Cache            : N/A
                L2 Cache            : N/A
                Texture Memory      : N/A
                Texture Shared      : N/A
                Total               : N/A
            Double Bit            
                Device Memory       : N/A
                Register File       : N/A
                L1 Cache            : N/A
                L2 Cache            : N/A
                Texture Memory      : N/A
                Texture Shared      : N/A
                Total               : N/A
        Aggregate
            Single Bit            
                Device Memory       : N/A
                Register File       : N/A
                L1 Cache            : N/A
                L2 Cache            : N/A
                Texture Memory      : N/A
                Texture Shared      : N/A
                Total               : N/A
            Double Bit            
                Device Memory       : N/A
                Register File       : N/A
                L1 Cache            : N/A
                L2 Cache            : N/A
                Texture Memory      : N/A
                Texture Shared      : N/A
                Total               : N/A
    Retired Pages
        Single Bit ECC              : N/A
        Double Bit ECC              : N/A
        Pending                     : N/A
    Temperature
        GPU Current Temp            : 32 C
        GPU Shutdown Temp           : 96 C
        GPU Slowdown Temp           : 93 C
    Power Readings
        Power Management            : Supported
        Power Draw                  : 12.96 W
        Power Limit                 : 250.00 W
        Default Power Limit         : 250.00 W
        Enforced Power Limit        : 250.00 W
        Min Power Limit             : 125.00 W
        Max Power Limit             : 300.00 W
    Clocks
        Graphics                    : 139 MHz
        SM                          : 139 MHz
        Memory                      : 405 MHz
        Video                       : 544 MHz
    Applications Clocks
        Graphics                    : N/A
        Memory                      : N/A
    Default Applications Clocks
        Graphics                    : N/A
        Memory                      : N/A
    Max Clocks
        Graphics                    : 1911 MHz
        SM                          : 1911 MHz
        Memory                      : 5505 MHz
        Video                       : 1708 MHz
    Clock Policy
        Auto Boost                  : N/A
        Auto Boost Default          : N/A
    Processes
        Process ID                  : 3174
            Type                    : G
            Name                    : /usr/lib/xorg/Xorg
            Used GPU Memory         : 109 MiB
        Process ID                  : 3689
            Type                    : G
            Name                    : /usr/bin/krunner
            Used GPU Memory         : 2 MiB
        Process ID                  : 3701
            Type                    : G
            Name                    : /usr/bin/plasmashell
            Used GPU Memory         : 49 MiB

2 个答案:

答案 0 :(得分:1)

问题是cuda8.0 runfile中的驱动程序375.26对于1080ti来说太旧了。您应该在其official website下载1080ti的相应驱动程序。

答案 1 :(得分:0)

解决此问题的方法是实际使用较旧的驱动程序。我不记得哪个版本适用,但是较新的驱动程序不适用于我。