하루를 산다는건....

[끄적끄적]
하루하루... 잡힐 듯 잡히지 않는 무언가... 하기로 해놓고 하지 못한 것들이 너무 많다. 언제 부턴가 그동안 내 모습이 아닌 다른 모습으로 살고 있는 거 같다. 어릴 적부터의 내 모습.... 그 모습이 얼마나 남아있을까? 과연 그 때의 나는 나였을까? 적어도 지금은 바껴야 할텐데.... 지금 이런 마음가짐을 어서 버려야되는데...... 어쩌면 이제서야 내가 정상으로 바뀌어 가고 있을지도..
TAG. 헛소리

Caching vs Replica allocation

[CS/Study]

This article is just my understanding about two techniques.
Caching and Replica allocation technique are the famous technique
to improve data accessibility in distributed sytem.
And they are also used in Mobile Ad hoc Network which is my reseach area.
So this description is aspect of MANET(Mobile Ad Hoc Netowrk).

In fact, the aim of two technique is similar although there are critial difference between them.

Caching : The node which is a member of network store the data temporarily by their discretion.
                So whether to cache data or not depends on the node itself.
                When using caching technique, the node need not to request data which is stored own storage.
                The query delay will be decreased and accessbility will be increased
                when the node can't access to data source.
                That is reason enough why we use caching technique.

Replica allocation : Replica allocation technique is also very benenfit technology.
                                 The nodes are stored data proactively.
                                 Participating replica allocation phase means that  a node promise other nodes
                                 which also participate in replica allocation phase to have replicated data implicitly.
                                 When using replica allocation techinique, the node can retrieve from a nearby node
                                 which has the replicated data instead of data source.
                                 It also reduce query delay and increase data accessibility
                                 when a node can't access data source.


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