GPGPU: Difference between revisions

From RedwoodCenter
Jump to navigationJump to search
No edit summary
 
No edit summary
Line 1: Line 1:
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 [[cluster|here]]
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 [[cluster|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 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

Revision as of 13:12, 13 September 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 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