Nvidia 和 Cuda 的正确版本

Nvidia 和 Cuda 的正确版本

在(最终)在 14.04 上安装了 cuda 之后,在没有破坏我的 nvidia 驱动程序的情况下,我尝试验证安装。

首先我必须安装 nvcc,

sudo apt-get install nvidia-cuda-toolkit

设置环境

export PATH=/usr/local/cuda-7.5/bin:$PATH    
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH

安装示例

cuda-install-samples-7.5.sh ~    
cd ~/NVIDIA_CUDA-Samples_7.5/0_Simple/vectorAdd   
make   
./vectorAdd  

但是对于最后一个命令我收到此错误:

CUDA driver version is insufficient for CUDA runtime version

一些输出,

lspci -k | grep -EA2 'VGA|3D'

00:02.0 VGA compatible controller: Intel Corporation Core Processor
Integrated Graphics Controller (rev 18)     Subsystem: Dell Device 044f
Kernel driver in use: i915
 -- 01:00.0 VGA compatible controller: NVIDIA Corporation GT216M  
[GeForce GT 330M] (rev a2)  Subsystem: Dell Device 044f     
Kernel driver in use: nvidia
nvidia-smi  

+------------------------------------------------------+   
| NVIDIA-SMI 340.96     Driver Version: 340.96         |   
|------------------------------------------------------+----------------------+----------------------+   
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |  
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |   
+------------------------------------------------------+   
| NVIDIA-SMI 340.96 Driver Version: 340.96             |  

| --------------------------------------+----------------------+----------------------+ 
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M.    
| |=====================================+======================+======================| | 
0 GeForce GT 330M Off | 0000:01:00.0 N/A | N/A | | N/A 69C P12 N/A / N/A | 423MiB / 1023MiB | N/A Default
| +-------------------------------+---------------------+-----------------------+ |   
Compute processes: GPU Memory | | GPU PID Process name Usage   
| |=============================================================================| |   
0 Not Supported
| +-----------------------------------------------------------------------------+ |  

并且 nvcc -V 给出,

nvcc: NVIDIA (R) Cuda compiler driver 
Copyright (c) 2005-2013 NVIDIA Corporation 
Built on Wed_Jul_17_18:36:13_PDT_2013 
Cuda compilation tools, release 5.5, V5.5.0

dpkg -l | grep -i nvidia
ii  bbswitch-dkms                 0.7-2ubuntu1                amd64        Interface for toggling the power on nVidia Optimus video cards
ii  libcublas5.5:amd64            5.5.22-3ubuntu1             amd64        NVIDIA CUDA BLAS runtime library
rc  libcuda1-304                  304.131-0ubuntu0.14.04.1    amd64        NVIDIA CUDA runtime library
rc  libcuda1-304-updates          304.131-0ubuntu0.14.04.1    amd64        NVIDIA CUDA runtime library
ii  libcuda1-340                  340.96-0ubuntu0.14.04.1     amd64        NVIDIA CUDA runtime library
rc  libcuda1-340-updates          340.96-0ubuntu0.14.04.1     amd64        NVIDIA CUDA runtime library
rc  libcuda1-352-updates          352.63-0ubuntu0.14.04.1     amd64        NVIDIA CUDA runtime library
ii  libcudart5.5:amd64            5.5.22-3ubuntu1             amd64        NVIDIA CUDA runtime library
ii  libcufft5.5:amd64             5.5.22-3ubuntu1             amd64        NVIDIA CUDA FFT runtime library
ii  libcufftw5.5:amd64            5.5.22-3ubuntu1             amd64        NVIDIA CUDA FFTW runtime library
ii  libcuinj64-5.5:amd64          5.5.22-3ubuntu1             amd64        NVIDIA CUDA INJ runtime library (64-bit)
ii  libcurand5.5:amd64            5.5.22-3ubuntu1             amd64        NVIDIA CUDA Random Numbers Generation runtime library
ii  libcusparse5.5:amd64          5.5.22-3ubuntu1             amd64        NVIDIA CUDA Sparse Matrix runtime library
ii  libnppc5.5:amd64              5.5.22-3ubuntu1             amd64        NVIDIA Performance Primitives core runtime library
ii  libnppi5.5:amd64              5.5.22-3ubuntu1             amd64        NVIDIA Performance Primitives for image processing runtime library
ii  libnpps5.5:amd64              5.5.22-3ubuntu1             amd64        NVIDIA Performance Primitives for signal processing runtime library
ii  libnvtoolsext1:amd64          5.5.22-3ubuntu1             amd64        NVIDIA Tools Extension
ii  libnvvm2:amd64                5.5.22-3ubuntu1             amd64        NVIDIA CUDA Compiler NVVM runtime library
ii  nvidia-340                    340.96-0ubuntu0.14.04.1     amd64        NVIDIA binary driver - version 340.96
ii  nvidia-340-uvm                340.96-0ubuntu0.14.04.1     amd64        Transitional package for nvidia-340
ii  nvidia-cuda-dev               5.5.22-3ubuntu1             amd64        NVIDIA CUDA development files
ii  nvidia-cuda-doc               5.5.22-3ubuntu1             all          NVIDIA CUDA and OpenCL documentation
ii  nvidia-cuda-gdb               5.5.22-3ubuntu1             amd64        NVIDIA CUDA GDB
ii  nvidia-cuda-toolkit           5.5.22-3ubuntu1             amd64        NVIDIA CUDA toolkit
ii  nvidia-libopencl1-331         340.96-0ubuntu0.14.04.1     amd64        Transitional package for nvidia-libopencl1-340
ii  nvidia-libopencl1-340         340.96-0ubuntu0.14.04.1     amd64        NVIDIA OpenCL Driver and ICD Loader library
ii  nvidia-opencl-dev:amd64       5.5.22-3ubuntu1             amd64        NVIDIA OpenCL development files
ii  nvidia-opencl-icd-340         340.96-0ubuntu0.14.04.1     amd64        NVIDIA OpenCL ICD
ii  nvidia-prime                  0.6.2                       amd64        Tools to enable NVIDIA's Prime
ii  nvidia-profiler               5.5.22-3ubuntu1             amd64        NVIDIA Profiler for CUDA and OpenCL
ii  nvidia-settings               352.93-0ubuntu1             amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-visual-profiler        5.5.22-3ubuntu1             amd64        NVIDIA Visual Profiler

这是否意味着我需要的是 cuda v5.5 而不是 v7.5?我需要重新启动并卸载 v7.5 并安装 v5.5?

相关内容