From RedwoodCenter
Revision as of 03:00, 4 October 2009 by Kilian (talk | contribs) (→‎OpenCL)
Jump to navigationJump to search

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


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/

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/ from

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


 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

The compiled examples can be found in the directory