cuda 6.5 @ ubuntu 14.04 for GT240

Post date: 2015/04/26 6:43:00

cuda7.0が出たが,GT240の最新版ドライバがR340のため,cuda6.5をインストール

  1. ubuntu14.04 用 cuda_6.5.14_linux_64.run をダウンロード
  2. コンソールモードでX停止
      • $ sudo service stop lightdm $ sudo init 3
  3. 古いパッケージを削除
      • $ sudo apt-get --purge remove nvidia-* $ sudo apt-get --purge remove cuda-*
  4. cuda 6.5 install
      • $ sudo sh ./cuda_6.5.14_linux_64.run
  5. 動作テスト
      • $ ./startx
      • $ cat /proc/driver/nvidia/version
      • NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.29
      • Thu Jul 31 20:23:19 PDT 2014
      • GCC version: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
  6. 再起動
      • $ sudo reboot
  7. デバイス確認
      • $ cd ~/NVIDIA_CUDA-6.5_Samples/1_Utilities/deviceQuery
      • $ make
      • $ ./deviceQuery
      • ./deviceQuery Starting... CUDA Device Query (Runtime API) version (CUDART static linking)
      • Detected 1 CUDA Capable device(s)
      • Device 0: "GeForce GT 240" CUDA Driver Version / Runtime Version 6.5 / 6.5
      • CUDA Capability Major/Minor version number: 1.2
      • Total amount of global memory: 512 MBytes (536543232 bytes)
      • (12) Multiprocessors, ( 8) CUDA Cores/MP: 96 CUDA Cores
      • GPU Clock rate: 1340 MHz (1.34 GHz)
      • Memory Clock rate: 1700 Mhz
      • Memory Bus Width: 128-bit
      • Maximum Texture Dimension Size (x,y,z) 1D=(8192), 2D=(65536, 32768), 3D=(2048, 2048, 2048)
      • Maximum Layered 1D Texture Size, (num) layers 1D=(8192), 512 layers
      • Maximum Layered 2D Texture Size, (num) layers 2D=(8192, 8192), 512 layers
      • Total amount of constant memory: 65536 bytes
      • Total amount of shared memory per block: 16384 bytes
      • Total number of registers available per block: 16384
      • Warp size: 32
      • Maximum number of threads per multiprocessor: 1024
      • Maximum number of threads per block: 512
      • Max dimension size of a thread block (x,y,z): (512, 512, 64)
      • Max dimension size of a grid size (x,y,z): (65535, 65535, 1)
      • Maximum memory pitch: 2147483647 bytes
      • Texture alignment: 256 bytes
      • Concurrent copy and kernel execution: Yes with 1 copy engine(s)
      • Run time limit on kernels: Yes
      • Integrated GPU sharing Host Memory: No
      • Support host page-locked memory mapping: Yes
      • Alignment requirement for Surfaces: Yes
      • Device has ECC support: Disabled
      • Device supports Unified Addressing (UVA): No
      • Device PCI Bus ID / PCI location ID: 1 / 0
      • Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) > deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.5, NumDevs = 1, Device0 = GeForce GT 240
      • Result = PASS

注意点:

  • installer 用 cuda-repo-ubuntu1404_6.5-14_amd64.deb ファイルは PGP キー取得でエラーを起こす
  • cuda-7.0 は nvidia-346 が必要
  • sm_1.1, 1.2(GT240), 1.3 は近々外される模様(既にcuda-7.0 はdriverが無い)
  • cusp-library-0.5.0 の cg は sm_1.2 には対応せず