GPGPU: Difference between revisions

From RedwoodCenter
Jump to navigationJump to search
No edit summary
Line 24: Line 24:
   CC        := gcc43
   CC        := gcc43
   LINK      := g++43 -fPIC
   LINK      := g++43 -fPIC
You can use the following command to apply the above changes:
  patch -p0 <  /clusterfs/cortex/software/opencl-2.3/src/gpucomputingsdk_gcc43.patch


You can compile all the code examples by running (fails at the moment):
You can compile all the code examples by running (fails at the moment):

Revision as of 03:00, 4 October 2009

This wiki page contains information on how to use the graphics processing units (GPU) on the graphics card for general-purpose computing. For general information on the cluster, please see here

OpenCL

note: OpenCL doesn't work yet. Here is what I tried so far

The OpenCL applications in the NVIDIA GPU Computing SDK require a GPU with CUDA Compute Architecture to run properly. In order to use OpenCL, you have to load the CUDA environment:

 module load cuda

Install version 2.3 of the NVIDIA GPU Computing SDK by executing the followin command

 bash /clusterfs/cortex/software/opencl-2.3/src/gpucomputingsdk_2.3a_linux.run

It seems that you need gcc 4.3 in order to compile SDK. Change the following three lines in ~/NVIDIA_GPU_Computing_SDK/OpenCL/common/common_opencl.mk from

 CXX        := g++
 CC         := gcc
 LINK       := g++ -fPIC

to

 CXX        := g++43
 CC         := gcc43
 LINK       := g++43 -fPIC

You can use the following command to apply the above changes:

 patch -p0 <  /clusterfs/cortex/software/opencl-2.3/src/gpucomputingsdk_gcc43.patch

You can compile all the code examples by running (fails at the moment):

 export LIBRARY_PATH=$LIBRARY_PATH:~/NVIDIA_GPU_Computing_SDK/OpenCL/common/lib/Linux64
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/NVIDIA_GPU_Computing_SDK/OpenCL/common/lib/Linux64
 cd ~/NVIDIA_GPU_Computing_SDK/OpenCL
 make

The compiled examples can be found in the directory

 ~/NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release