From RedwoodCenter
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 the following commands:

 module load X11
 cd ~/NVIDIA_GPU_Computing_SDK/OpenCL

The following commads don't seem to be necessary:

 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

The compiled examples can be found in the directory:


note: the example programs don't run at the moment due to a driver mismatch

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