Ubuntu 10.04ã«CUDAãã¤ã³ã¹ãã¼ã«ããæã®ã¡ã¢
CUDAã®ä½¿ããGPU (GeForce GTX 470) ãæè¼ããPCãè³¼å
¥ãã¦ãUbuntu 10.04ç°å¢ã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã®ã§ãæé ãã¾ã¨ãã¦ã¿ã¾ããã
ä¸ã®åç»ã¯ãCUDAããã¹ãããããã«ä½ã£ãæ°å¤è¨ç®ã®ããã°ã©ã ã®çµæãã gnuplot 㨠ImageMagick ãå©ç¨ãã¦ä½æãããã®ã§ãã
ã¤ã³ã¹ãã¼ã«ã¯ä»¥ä¸ã®é åºã§è¡ãã¾ãã
- Ubuntu 10.04
- NVIDIA製ãã£ã¹ãã¬ã¤ãã©ã¤ã
- CUDAããã°ã©ã ã®ã³ã³ãã¤ã«ã«å¿ è¦ãªã©ã¤ãã©ãªç
- CUDA Toolkit 3.1
- GPU Computing SDK 3.1
Ubuntu 10.04
ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯ãããããªã¨ããã«æ¸ããã¦ããã®ã§ãããã§ã¯çç¥ãã¾ããä»å使ç¨ããPC㯠Core i7 CPU + ã¡ã¤ã³ã¡ã¢ãªã¼ 4GiB ã¨ãããã¨ã§ã64bitçãå ¥ãã¾ããã
ä½è«ã§ãããã¡ã¢ãªã¼ã¯ãã®å¾12GiBã«å¢è¨ãã¾ãããä¸ã®åç»ãä½æãããã¨ãããã4GiBã§ã¯è¶³ããªããªã£ã¦ãã¾ã£ãããã§ããåç»ã¸ã®å¤æã®ããã«ImageMgickã®convertãèµ·åããã¨ã1ããã»ã¹ã§ç´8GiBæ¶è²»ãã¾ããã32bit OSã§é å¼µãã®ãããããéçã§ãããã¡ãªã¿ã«ãã½ã¼ã¹ã³ã¼ãã¯https://code.launchpad.net/~irie/+junk/cuKdVsolvã«æãã¦ããã®ã§ããèªç±ã«ã©ããã
NVIDIA製ãããªãã©ã¤ã
ãã·ã¹ãã > ã·ã¹ãã 管ç > ãã¼ãã¦ã§ã¢ã»ãã©ã¤ããããã¤ã³ã¹ãã¼ã«ã§ãã¾ããããã¼ã¸ã§ã³ãå¤ãã®ã§ãUbuntu-X team ã® X Updates PPA ãå©ç¨ãã¦æ°ãããã¼ã¸ã§ã³ãå ¥ãã¾ãã
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get install nvidia-current nvidia-current-modaliases nvidia-settings
ã¤ã³ã¹ãã¼ã«ãçµãã£ããããã·ã¹ãã > ã·ã¹ãã 管ç > ãã¼ãã¦ã§ã¢ã»ãã©ã¤ããã§NVIDIAã®ãã©ã¤ããæå¹ã«ãªã£ã¦ãããã¨ã確èªããåèµ·åãã¾ãã
CUDAããã°ã©ã ã®ã³ã³ãã¤ã«ã«å¿ è¦ãªã©ã¤ãã©ãªç
Ubuntuã®å ¬å¼ã®ããã±ã¼ã¸ãå©ç¨ãã¾ãã
sudo apt-get install g++ freeglut3-dev libxi-dev libxmu-dev
CUDA Toolkit
CUDAã®ãã¦ã³ãã¼ãã®ãã¼ã¸ (http://developer.nvidia.com/object/cuda_3_1_downloads.html#Linux) ãããUbuntu 9.10 ç¨ã® CUDA Toolkit ã®ãã¡ã¤ã« (cudatoolkit_3.1_linux_64_ubuntu9.10.run) ããã¦ã³ãã¼ããã¦ã以ä¸ã®ããã«ã¤ã³ã¹ãã¼ã«ãã¾ãã
chmod a+x cudatoolkit_3.1_linux_64_ubuntu9.10.run sudo ./cudatoolkit_3.1_linux_64_ubuntu9.10.run
éä¸ã§ã¤ã³ã¹ãã¼ã«å
ãèããã¾ãããããã©ã«ãã® /usr/local/cuda ã«å
¥ãã¾ãã
ã¤ã³ã¹ãã¼ã«ãçµãã£ãããå種ã®ãã¡ã¤ã«æ¤ç´¢ãã¹ãè¨å®ãã¾ãã
以ä¸ã®å
容㮠/etc/ld.so.conf.d/cuda.conf ã¨ãããã¡ã¤ã«ãä½æãã¾ãã
/usr/local/cuda/lib64 /usr/local/cuda/lib
ãã®è¨å®ãæå¹ã«ããããã«ã以ä¸ã®ã³ãã³ããå®è¡ãã¾ãã(11/5 追è¨)
sudo ldconfig
以ä¸ã®å 容㮠/etc/profile.d/cuda.sh ã¨ãããã¡ã¤ã«ãä½æãã¾ãã
export PATH="/usr/local/cuda/bin:$PATH" export LIBRARY_PATH="/usr/lib/nvidia-current"
ããã§ããã®è¨å®ãæå¹ã«ããããã«åãã°ã¤ã³ãã¾ãã
GPU Computing SDK
GPU Computing SDK ã¯ã追å ã®ã©ã¤ãã©ãªããµã³ãã«ããã°ã©ã ãããã¥ã¡ã³ãé¡ã®ã»ããã§ãããããã¤ã³ã¹ãã¼ã«ããªãã¦ãCUDAã®ããã°ã©ã ã¯ä½æã§ãã¾ãããåèã«ãªãã®ã§å
¥ãã¦ããæ¹ãããã§ãããã
CUDA Toolkitã¨åãå ´æãã gpucomputingsdk_3.1_linux.run ããã¦ã³ãã¼ãããã¤ã³ã¹ãã¼ã«ãã¾ãã
chmod a+x gpucomputingsdk_3.1_linux.run ./gpucomputingsdk_3.1_linux.run
éä¸ã§ã¤ã³ã¹ãã¼ã«å ãèããã¾ãããããã©ã«ãã® $HOME/NVIDIA_GPU_Computing_SDK ã«å ¥ãã¾ãã
次ã«ãµã³ãã«ããã°ã©ã ããã«ããã¾ãã
cd ~/NVIDIA_GPU_Computing_SDK/C make
ãã«ããçµããã¨ã$HOME/NVIDIA_GPU_Computing_SDK/C/bin/linux/release ã«ãããããªãã¤ããªãçæããã¦ããã®ã§ãåããã¦ã¿ã¾ããä¾ãã°nbodyã¨ããã®ã¯ãNä½åé¡ã解ãããã°ã©ã ã§ããä¸ã®ã¹ã¯ãªã¼ã³ã·ã§ããã®ããã«ãããããã®å
ã®ç¹ãé£ã³åãã¾ãã
å精度ã§ããã450GFLOPSåºã¦ãã¾ã (å精度ã ã¨90GFLOPSããã)ã
ãã¶ã64bitç°å¢åºæã®åé¡
以ä¸ã®è¨å®ãæ¸ã¾ããå¾ãæ¸ç±ãã¯ããã¦ã®CUDAããã°ã©ãã³ã°ãã®ãµã³ãã«ããã°ã©ã (http://www.kohgakusha.co.jp/support/cuda/index.html) ããã«ããããããããã/usr/bin/ld: cannot find -lcutilãã¨ããã¨ã©ã¼ãåºã¦æ¢ã¾ã£ã¦ãã¾ãã¾ãããã©ããã $HOME/NVIDIA_GPU_Computing_SDK/C/lib å ã®ãã¡ã¤ã«åã«åé¡ãããããã ã£ãã®ã§ã以ä¸ã®ããã«ãã¦ã·ã³ããªãã¯ãªã³ã¯ãä½æããã¨ããã«ããéãæ£å¸¸ã«å®è¡ãããã¨ãåºæ¥ã¾ããã
cd ~/NVIDIA_GPU_Computing_SDK/C/lib for i in `ls *_x86_64.a`; do ln -sv $i ${i%_x86_64.a}.a; done
- ä½è : éæ¨å°ä¹,é¡ç°å½°,第äºI Oç·¨éé¨
- åºç社/ã¡ã¼ã«ã¼: å·¥å¦ç¤¾
- çºå£²æ¥: 2009/11
- ã¡ãã£ã¢: åè¡æ¬
- è³¼å ¥: 11人 ã¯ãªãã¯: 310å
- ãã®ååãå«ãããã° (29件) ãè¦ã