Difference between revisions of "OpenCL"

From UFRC
Jump to navigation Jump to search
m (Text replacement - "#uppercase" to "uc")
 
(9 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{|<!--CONFIGURATION: REQUIRED-->
 
{|<!--CONFIGURATION: REQUIRED-->
 
|{{#vardefine:app|opencl}}
 
|{{#vardefine:app|opencl}}
|{{#vardefine:url|http://developer.nvidia.com/opencl}}
+
|{{#vardefine:url|http://www.khronos.org/opencl/}}
 
<!--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|}}            <!--PBS SCRIPTS-->
 
|{{#vardefine:pbs|}}            <!--PBS SCRIPTS-->
|{{#vardefine:policy|}}        <!--POLICY-->
+
|{{#vardefine:policy|1}}        <!--POLICY-->
 
|{{#vardefine:testing|}}      <!--PROFILING-->
 
|{{#vardefine:testing|}}      <!--PROFILING-->
 
|{{#vardefine:faq|}}            <!--FAQ-->
 
|{{#vardefine:faq|}}            <!--FAQ-->
 
|{{#vardefine:citation|}}      <!--CITATION-->
 
|{{#vardefine:citation|}}      <!--CITATION-->
|{{#vardefine:installation|}} <!--INSTALLATION-->
+
|{{#vardefine:installation|1}} <!--INSTALLATION-->
 
|}
 
|}
 
<!--BODY-->
 
<!--BODY-->
Line 33: Line 33:
 
-->
 
-->
 
==System Variables==
 
==System Variables==
* HPC_{{#uppercase:{{#var:app}}}}_DIR
+
* HPC_{{uc:{{#var:app}}}}_DIR
* HPC_{{#uppercase:{{#var:app}}}}_INC
+
* HPC_{{uc:{{#var:app}}}}_INC
 +
* HPC_{{uc:{{#var:app}}}}_LIB
 
<!--Configuration-->
 
<!--Configuration-->
 
{{#if: {{#var: conf}}|==Configuration==
 
{{#if: {{#var: conf}}|==Configuration==
Line 41: Line 42:
 
<!--Run-->
 
<!--Run-->
 
{{#if: {{#var: exe}}|==Additional Information==
 
{{#if: {{#var: exe}}|==Additional Information==
WRITE_ADDITIONAL_INSTRUCTIONS_ON_RUNNING_THE_SOFTWARE_IF_NECESSARY
+
 
 +
The following example shows how to build a sample code with OpenCL.
 +
 
 +
<pre>
 +
[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
 +
</pre>
 
|}}
 
|}}
 
<!--PBS scripts-->
 
<!--PBS scripts-->
Line 49: Line 61:
 
<!--Policy-->
 
<!--Policy-->
 
{{#if: {{#var: policy}}|==Usage Policy==
 
{{#if: {{#var: policy}}|==Usage Policy==
WRITE USAGE POLICY HERE (Licensing, usage, access).
+
OpenCL is a trademark of Apple Inc., used under license by Khronos.
 
|}}
 
|}}
 
<!--Performance-->
 
<!--Performance-->
Line 65: Line 77:
 
<!--Installation-->
 
<!--Installation-->
 
{{#if: {{#var: installation}}|==Installation==
 
{{#if: {{#var: installation}}|==Installation==
See the [[{{PAGENAME}}_Install]] page for {{#var: app}} installation notes.|}}
+
The OpenCL implementation installed on the cluster is the one included with the NVIDIA CUDA Toolkit.|}}
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__

Latest revision as of 21:22, 6 December 2019

Description

opencl website  

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_OPENCL_DIR
  • HPC_OPENCL_INC
  • HPC_OPENCL_LIB

Additional Information

The following example shows how to build 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

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.