GPGPU: Difference between revisions

From RedwoodCenter
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 29: Line 29:
   patch -p0 <  /clusterfs/cortex/software/opencl-2.3/src/gpucomputingsdk_gcc43.patch
   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 the following commands:
 
  module load X11
  cd ~/NVIDIA_GPU_Computing_SDK/OpenCL
  make
 
The following commads don't seem to be necessary:


   export LIBRARY_PATH=$LIBRARY_PATH:~/NVIDIA_GPU_Computing_SDK/OpenCL/common/lib/Linux64
   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
   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
The compiled examples can be found in the directory:


   ~/NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release
   ~/NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release
'''note: the example programs don't run at the moment due to a driver mismatch'''
  NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release/oclVectorAdd
  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.

Latest revision as of 12:48, 7 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 the following commands:

 module load X11
 cd ~/NVIDIA_GPU_Computing_SDK/OpenCL
 make

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:

 ~/NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release

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

 NVIDIA_GPU_Computing_SDK/OpenCL/bin/linux/release/oclVectorAdd 
 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.