'CS/OpenCL'에 해당되는 글 2건

  1. [2009/10/24] Installation of the CUDA OpenCL on the Ubuntu (3)
  2. [2009/09/22] ATI Streaming (1)

Installation of the CUDA OpenCL on the Ubuntu

[CS/OpenCL]
This is how to install CUDA OpenCL on the Ubuntu.
I experience on my computer, ubuntu 9.04 and the graphic card is the NVIDIA 9600GT.
If you want to use CUDA openCL, please check your graphic card that supports GPGPU programming.
I know that version of kernel must be 2.6 distribution. Maybe after ubuntu 8.10, kernel version is larger than 2.6

This post is based on the CUDA OpenCL tutorial "OpenCL for NVIDIA GPUs" supported by NVIDIA.
You can get the tutorial from NVIDIA homepage.
Actually, I think this is very similar with the tutorial. However, I write some minor problem and the answer not in the tutorial...
And most of all, I'm korean...so my english is not well..so I hope that you can understand the semantic of the post.
And now, to install CUDA openCL, you must check your system.

First, verify the system has a CUDA-capable GPU.
In NVIDIA CUDA Web site, "http://www.nvidia.com/object/cuda_learn_products.html"

And gcc OpenCL support gcc version 3.4 as well as 4.x.
Type the following on the command to know the gcc version.

$gcc --version

If you have gcc or show the error message from the command, you must install the development tools such as build-essential and libraries.

Now, download the NVIDIA driver. As you know, in the linux, setting graphic driver has many problem.
I also took a problem. During install NVIDIA driver, my x window is broken. I wasted a lot of time to solve this problem. However, the answer is very simple-_-;;;

Download the NVIDIA driver from "http://developer.nvidia.com/object/opencl-download.html#Linux".
You must download NVIDIA Drivers for Linux, and GPU Computing SDK code samples and more.
And, must check your computer's driver, maybe verison of the NVIDIA driver is lower than 190.*.
For using CUDA OpenCL, must re-install driver download from above web page.

Before install NVIDIA driver, please get rid of old NVIDIA installations. Because new verison of driver will come into conflict with old version. So you can see the this messages when you want to start x.

"Error: API mismatch: the NVIDIA kernel module has version 180.44,
but this NVIDIA driver component has version 190.36. Please make
sure that the kernel module and all NVIDIA driver components
have the same version."

So that, if you want to meet the above message, follow these.
In X, "Ctrl+Alt+F1" , go to tty1, and then type

$nvidia-installer --uninstall
$apt-get remove --perge nvidia*

#stop xserver
$/etc/init.d/gdm stop

#make driver file executable
$chmod +x nvdrivers_2.3_linux_64_190.29.run

#execute
$./nvdrivers_2.3_linux_64_190.29.run

#restart xserver
$/etc/init.d/gdm start
$startx

#validate the version of NVIDIA driver
Execute terminal in X window, command line, run
$/usr/bin/nvidia-settings

You can see the version of driver is 190.*.

Finally, install GPU Computing SDK, if you follow these step and clear, installation of SDK is very easy...;;;;
Just type this command;;

$chmod +x gpucomputingsdk_2.3b_linux.run
$./gpucomputingsdk_2.3b_linux.run

The default path is /{HOME_DIR}/NVIDIA_GPU_Computing_SDK/
In there, you verify the installation.
In {default path}/OpenCL/, type make.

If you meet with the library link error (maybe, /usr/bin/ld:cannot find -lglut"), type like this.

$ls /usr/lib64 |grep glut

It will display "libglut.so.3  libglut.so.3.8.0"
$ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so

Now, all program in OpenCL folder, you excute in {default path}/OpenCL/bin/linux/release/~~~.
There are many programs. You choose one program, and run.

Now, you can enjoy the CUDA OpenCL, good luck to you.


Reference : Getting started OpenCL for NVIDIA GPUs Installation and Verification On Linux
                   (Oct. 5, 2009)
TAG. CUDA, NVIDIA, OpenCL

ATI Streaming

[CS/OpenCL]

이번 수업 중 큰 마음을 먹고 슈퍼컴퓨팅에 도전 해보기로 하였다.

나도 이제 슈퍼컴퓨터 유저가 될 수 있는 건가??

수업 시간이 금요일 늦은 시각이라 고민을 하였지만...

연구실 형들이 듣고, 나도 그동안 관심이 있었던 참에..그냥 신청ㅋ

하지만 텀 프로젝트가 있다ㅠㅠ

학부 졸업 이후 처음으로 하는 텀 프로젝트..주제는 GPU를 이용한 병렬처리이다.

GPU가 무엇인가 하면...

CPU는 우리가 아는 Central Processing Unit으로 중앙 연산 장치이다.

GPU란?

GPU는 Graphic Processing Unit 으로 그래픽을 전문으로 한다.

일반적으로 "그래픽 카드"라는 것은 이 GPU를 뜻한다.

CPU와 GPU는 차이는 명령의 실행 방법에서 차이가 난다

뭐 자세하게는 나도 알지 못한다. 배우는 입장이어서-_-

하지만 CPU의 경우 복수의 명령을 한번에 처리하는 파이프 라인의 기능이 있지만

GPU는 Shader 프로세스를 통해 하나의 프로세스에 처리를 명령할 수 있다.

즉....내가 아는 바로는.......

CPU의 경우 복잡한 명령을 처리하는데 적합하고, GPU는 하나의 명령을 병렬처리 하는데 용이하다.

실제로 CPU에만 의존하여 그래픽을 처리할 때는 1초에 점 1,2개를 찍을 수 있지만..

GPU는 1초에 하나의 그림을 그릴 수 있다.

이러한 이유로 GPU는 큰 matrix 연산(행렬 연산)등을 위해 많이 쓰인다.

최근 만년 그래픽 업게 2인자라고 불리우는 ATI도 GPU를 이용한 기술인 ATI Stream기술을 활용한

최신 그래픽 카드를 출시하기도 하였다.

업계 1위인 NVIDIA의 경우 CUDA라는 기술로 이미 나와있음.

아무튼....서론이 좀 길지만...이번에 최신 기술인 ATI STeaming을 이용한 병렬처리를 해볼 생각이다.

용녀랑 같이 한다.
 
얼마전 젊은 날 함께 즐기면서 보내자고 했건만....

이렇게 텀을 함께 하면서-ㅠ- 보내는 구만..ㅋㅋㅋㅋㅋ

좀 잘하는 녀석이니 많이 배우면서 열심히 해야겠군..

ATI Stream 관련 자료를 몇가지..