Changes between Version 2 and Version 3 of Reading/XenG/cuda


Ignore:
Timestamp:
Apr 16, 2009, 3:31:07 PM (16 years ago)
Author:
rider
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Reading/XenG/cuda

    v2 v3  
    155155}}}
    156156
    157 == 步驟八: 設定你的 DomU ==
     157== 步驟八: 設定你的 DomU 基本環境 ==
    158158'''# 設定 locales (系統語系)''' [[BR]]
    159159rider@nvidia:~$ sudo vim /etc/profile [[BR]]
     
    166166rider@nvidia:~$ source /etc/profile [[BR]]
    167167rider@nvidia:~$ sudo dpkg-reconfigure locales [[BR]]
     168'''# 更新 PCI ID Database''' [[BR]]
    168169rider@nvidia:~$ sudo apt-get update [[BR]]
    169170rider@nvidia:~$ sudo apt-get install wget [[BR]]
    170 '''# 更新 PCI ID Database''' [[BR]]
    171171rider@nvidia:~$ sudo update-pciids [[BR]]
    172172'''# 查看顯卡資訊有無正常顯示''' [[BR]]
     
    183183pciback: pcistub_init_devices_late
    184184}}}
     185
     186== 步驟九: 安裝 CUDA Toolkit & SDK ==
     187'''# 安裝環境所需套件''' [[BR]]
     188rider@nvidia:~$ sudo apt-get install autoconf automake build-essential gcc make mesa-common-dev libglu1-mesa-dev mesa-utils libxmu-headers libxmu6 libxmu-dev zlib1g-dev libjpeg62 libjpeg62-dev xutils-dev libxaw-headers libxaw7 libxaw7-dev libxext6 libxext-dev rxvt lwm xauth xvfb xfonts-100dpi xfonts-75dpi culmus xfonts-scalable xfonts-base libtool initramfs-tools libxi6 libxi-dev linux-kernel-devel xserver-xorg xserver-xorg-core xserver-xorg-dev[[BR]]
     189'''# 下載 NVIDIA CUDA toolkit''' [[BR]]
     190rider@nvidia:~$ mkdir -p nvidia [[BR]]
     191rider@nvidia:~$ mkdir -p ./nvidia/cuda [[BR]]
     192rider@nvidia:~$ cd ./nvidia/cuda/ [[BR]]
     193rider@nvidia:~/nvidia/cuda$ wget http://developer.download.nvidia.com/compute/cuda/2_1/toolkit/cudatoolkit_2.1_linux64_ubuntu8.04.run [[BR]]
     194
     195'''# 下載 NVIDIA CUDA SDK''' [[BR]]
     196rider@nvidia:~/nvidia/cuda$ wget http://developer.download.nvidia.com/compute/cuda/2_1/SDK/cuda-sdk-linux-2.10.1215.2015-3233425.run [[BR]]
     197rider@nvidia:~/nvidia/cuda$ chmod a+x * [[BR]]
     198rock@cloud:~$ sudo apt-get install autoconf automake build-essential gcc make libtool initramfs-tools libxi6 libxi-dev libxmu6 libxmu-dev xserver-xorg-core xserver-xorg-dev [[BR]]
     199
     200'''# 安裝 NVIDIA CUDA toolkit''' [[BR]]
     201rider@nvidia:~/nvidia/cuda$ sudo sh cudatoolkit_2.1_linux64_ubuntu8.04.run [[BR]]
     202{{{
     203Enter install path (default /usr/local/cuda, '/cuda' will be appended):
     204}}}
     205
     206# Note:
     207{{{
     208* Please make sure your PATH includes /usr/local/cuda/bin
     209* Please make sure your LD_LIBRARY_PATH includes /usr/local/cuda/lib
     210*   or add /usr/local/cuda/lib to /etc/ld.so.conf and run ldconfig as root
     211
     212* Please read the release notes in /usr/local/cuda/doc/
     213
     214* To uninstall CUDA, delete /usr/local/cuda
     215* Installation Complete
     216}}}
     217
     218'''# 安裝 NVIDIA CUDA SDK''' [[BR]]
     219rock@cloud:~/nvidia/cuda$ sudo sh cuda-sdk-linux-2.10.1215.2015-3233425.run [[BR]]
     220
     221# Note:
     222{{{
     223{{{
     224Enter install path (default /usr/local/cuda, '/cuda' will be appended): /usr/local/NVIDIA_CUDA_SDK
     225}}}
     226
     227}}}
     228{{{
     229Configuring SDK Makefile (/usr/local/NVIDIA_CUDA_SDK/common/common.mk)...
     230
     231* Please make sure your PATH includes /usr/local/cuda/bin
     232* Please make sure your LD_LIBRARY_PATH includes /usr/local/cuda/lib
     233
     234* To uninstall the NVIDIA CUDA SDK, please delete /usr/local/NVIDIA_CUDA_SDK
     235}}}
     236
     237'''# 設定 CUDA 執行環境''' [[BR]]
     238rider@cloud:~$ sudo su
     239root@cloud:~$ echo "export PATH=$PATH:/usr/local/cuda/bin" >> /etc/profile [[BR]]
     240root@cloud:~$ source /etc/profile [[BR]]
     241root@cloud:~$ echo "/usr/local/cuda/lib" >> /etc/ld.so.conf [[BR]]
     242root@cloud:~$ ldconfig [[BR]]
     243root@cloud:~$ exit
     244
     245== 步驟十: 試跑 CUDA 範例 ==
     246'''# 進入 CUDA 專案目錄''' [[BR]]
     247rider@nvidia:~$ cd /usr/local/NVIDIA_CUDA_SDK/projects/ [[BR]]
     248'''# 編譯建構全部範例''' [[BR]]
     249rider@nvidia:/usr/local/NVIDIA_CUDA_SDK/projects$ sudo make [[BR]]
     250'''# 選擇一各 CUDA 範例''' [[BR]]
     251rider@nvidia:/usr/local/NVIDIA_CUDA_SDK/projects$ cd ./deviceQuery/ [[BR]]
     252rider@nvidia:/usr/local/NVIDIA_CUDA_SDK/projects/deviceQuery$ sudo make [[BR]]
     253'''# 進入編譯完成的專案目錄''' [[BR]]
     254rider@nvidia:/usr/local/NVIDIA_CUDA_SDK/projects/deviceQuery$ cd ../../bin/linux/release/ [[BR]]
     255'''# 執行''' [[BR]]
     256rider@nvidia:/usr/local/NVIDIA_CUDA_SDK/projects/deviceQuery$ sudo ./deviceQuery [[BR]]
     257'''# 輸出結果''' [[BR]]
     258{{{
     259Device 0: "GeForce 9800 GT"
     260  Major revision number:                         0
     261  Minor revision number:                         0
     262  Total amount of global memory:                 6385920 bytes
     263  Number of multiprocessors:                     11007
     264  Number of cores:                               88056
     265  Total amount of constant memory:               6385872 bytes
     266  Total amount of shared memory per block:       3236702400 bytes
     267  Total number of registers available per block: 6385904
     268  Warp size:                                     0
     269  Maximum number of threads per block:           0
     270  Maximum sizes of each dimension of a block:    0 x 6385808 x 0
     271  Maximum sizes of each dimension of a grid:     0 x 0 x 2
     272  Maximum memory pitch:                          3234490924 bytes
     273  Texture alignment:                             3236702608 bytes
     274  Clock rate:                                    0.00 GHz
     275  Concurrent copy and execution:                 Yes
     276}}}
     277
     278