OpenCL for NVIDIA GPUs
OpenCL support for NVIDIA GPUs comes with the CUDA Toolkit. Therefore you should load the CUDA module:
module load CUDA/<version>
You can find the header files (including C++ bindings) in the subfolder
$CUDA_ROOT/include/ and the libraries in
You can compile and link an OpenCL C program by:
$CC pi.c -lOpenCL
You might have to include e.g.
<CL/cl.h> or rather
<CL/opencl.h> (the header files were restructured in Feb 2010). The single header file
opencl.h now includes all the other headers (
cl_ext.h) as appropriate for the target platform, and simply including
opencl.h should be all that applications need to do. Then you have to specify the include path while compiling:
$CC pi.c -I$CUDA_ROOT/include/CL -lOpenCL
Attention: Whether your application can be compiled may depend on the compiler vendor, version, and flags supplied.