CUDA-4.0 on ubuntu 11.10

Post date: 2011/10/29 1:18:47

CUDA-3.2 on ubuntu 11.04 -> CUDA-4.0 on ubuntu 11.10

(g++ のバージョンが合わなくなっていた)

Ubuntu 11.10

NVIDIA Driver Version : 280.13 <- 多分このまま大丈夫

CUDA-3.2 -> CUDA-4.0 へ update !!

参考URL: http://tech.ckme.co.jp/cuda_inst.shtml

$ sudo apt-get install build-essential gcc-4.4 g++-4.4 libxi-dev libxmu-dev freeglut3-dev
$ sudo mv /usr/local/cuda /usr/local/cuda-3.2
$ sudo sh ./cudatoolkit_4.0.17_linux_64_ubuntu10.10.run
$ sh ./gpucomputingsdk_4.0.17_linux.run
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.5
update-alternatives: /usr/bin/gcc (gcc) を提供するために 自動モード で /usr/bin/gcc-4.5 を使います。
update-alternatives: 警告: 関連する (リンクグループ gcc の) ファイル /usr/bin/g++-4.5 が存在しないので、/usr/bin/g++ の作成をスキップします。
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
$ sudo update-alternatives --config gcc
alternative gcc (/usr/bin/gcc を提供) には 3 個の選択肢があります。
  選択肢    パス            優先度  状態
------------------------------------------------------------
* 0            /usr/bin/gcc-4.6   60        自動モード
  1            /usr/bin/gcc-4.4   40        手動モード
  2            /usr/bin/gcc-4.5   50        手動モード
  3            /usr/bin/gcc-4.6   60        手動モード
現在の選択 [*] を保持するには Enter、さもなければ選択肢の番号のキーを押してください: 1
update-alternatives: /usr/bin/gcc (gcc) を提供するために 手動モード で /usr/bin/gcc-4.4 を使います。
$ sudo ldconfig
/etc/ld.so.conf.d/cuda-x86_64.conf が設定済み
/usr/local/cuda/lib64
/usr/local/cuda/lib
$ reboot
########################################################
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2011 NVIDIA Corporation
Built on Thu_May_12_11:09:45_PDT_2011
Cuda compilation tools, release 4.0, V0.2.1221
$ cd ~/NVIDIA_GPU_Computing_SDK/C
$ make
$ ./bin/linux/release/deviceQuery
[deviceQuery] starting...
./deviceQuery Starting...
 CUDA Device Query (Runtime API) version (CUDART static linking)
Found 1 CUDA Capable device(s)
Device 0: "GeForce GTX 460"
  CUDA Driver Version / Runtime Version          4.0 / 4.0
  CUDA Capability Major/Minor version number:    2.1
  Total amount of global memory:                 1024 MBytes (1073283072 bytes)
  ( 7) Multiprocessors x (48) CUDA Cores/MP:     336 CUDA Cores
  GPU Clock Speed:                               1.40 GHz
  Memory Clock rate:                             1800.00 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 524288 bytes
  Max Texture Dimension Size (x,y,z)             1D=(65536), 2D=(65536,65535), 3D=(2048,2048,2048)
  Max Layered Texture Size (dim) x layers        1D=(16384) x 2048, 2D=(16384,16384) x 2048
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 32768
  Warp size:                                     32
  Maximum number of threads per block:           1024
  Maximum sizes of each dimension of a block:    1024 x 1024 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 65535
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and 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
  Concurrent kernel execution:                   Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support enabled:                No
  Device is using TCC driver mode:               No
  Device supports Unified Addressing (UVA):      Yes
  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 = 4.0, CUDA Runtime Version = 4.0, NumDevs = 1, Device = GeForce GTX 460
[deviceQuery] test results...
PASSED
Press ENTER to exit...