Difference between revisions of "OpenCL"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
<!--CONFIGURATION: OPTIONAL (|1}} means it's ON)--> | <!--CONFIGURATION: OPTIONAL (|1}} means it's ON)--> | ||
|{{#vardefine:conf|}} <!--CONFIGURATION--> | |{{#vardefine:conf|}} <!--CONFIGURATION--> | ||
− | |{{#vardefine:exe|}} <!--ADDITIONAL INFO--> | + | |{{#vardefine:exe|1}} <!--ADDITIONAL INFO--> |
|{{#vardefine:pbs|1}} <!--PBS SCRIPTS--> | |{{#vardefine:pbs|1}} <!--PBS SCRIPTS--> | ||
|{{#vardefine:policy|1}} <!--POLICY--> | |{{#vardefine:policy|1}} <!--POLICY--> |
Revision as of 19:12, 11 March 2013
Description
OpenCL™ (Open Computing Language) is a low-level API for heterogeneous computing that runs on GPUs. Using the OpenCL API, developers can launch compute kernels written using a limited subset of the C programming language on a GPU.
Required Modules
Serial
- opencl
System Variables
- HPC_{{#uppercase:opencl}}_DIR
- HPC_{{#uppercase:opencl}}_INC
Additional Information
The following example shows how to compile a sample code with OpenCL.
[prescott@r11a-s17 ~]$ mkdir opencl [prescott@r11a-s17 ~]$ cd opencl [prescott@r11a-s17 opencl]$ module load opencl [prescott@r11a-s17 opencl]$ wget -q https://raw.github.com/smistad/OpenCL-Getting-Started/master/main.c [prescott@r11a-s17 opencl]$ wget -q https://raw.github.com/smistad/OpenCL-Getting-Started/master/vector_add_kernel.cl [prescott@r11a-s17 opencl]$ gcc -c -I$HPC_OPENCL_INC main.c -o main.o [prescott@r11a-s17 opencl]$ gcc main.o -o myopenclprog -l OpenCL
PBS Script Examples
See the OpenCL_PBS page for opencl PBS script examples.
Usage Policy
OpenCL is a trademark of Apple Inc., used under license by Khronos.
Installation
The OpenCL implementation installed on the cluster is the one included with the NVIDIA CUDA Toolkit.