Education and Outreach Blog

« Back

HPC UNIVERSITY BI-WEEKLY CHALLENGE – OpenCL Heat

SUMMARY:

This problem challenges you to make use of the OpenCL framework to parallelize on a GPGPU a given simulation of heat flow.

QUESTION:

Your challenge is to take a sample OpenCL program and apply it to an existing simulation of heat flow, such that part of the simulation is offloaded onto a GPGPU to be executed in parallel.

The starter code is provided at the bottom of the challenge in the "OpenCL Heat Starter zip file." In this code, the GPGPU simply squares each number in an array. The code is based on an example provided by Apple (https://developer.apple.com/library/mac/samplecode/OpenCL_Hello_World_Example/Listings/hello_c.html).

The code for the heat flow simulation is the solution to the "Simple Heat" Challenge Problem (http://hpcuniversity.org/students/weeklyChallenge/64/). It is provided at the bottom of the challenge in the "Simple Heat zip file."

Your challenge is to insert the heat flow code into the OpenCL starter code and parallelize steps 28-31 of the Simple Heat algorithm, in which the temperature is advanced. Specifically, those steps of the algorithm should be executed on a GPGPU using an OpenCL kernel. The kernel code the GPGPU executes should be a simple assignment: output[i] = input[i].

A good way to get documentation on a particular OpenCL function call is to do a Google search for the name of the function and browse results from the Khronos Group.

A solution should consist of a modified version of the "OpenCL Heat Starter zip file," with the C code modified to include the Simple Heat code (with the default number of rows and columns each changed to 16), and which when run on a system with an OpenCL-capable GPGPU produces the output shown at the bottom of the challenge.

SOLUTION:

Will be posted April 6, 2015

LINK:

http://hpcuniversity.org/students/weeklyChallenge/95/

Comments
Trackback URL:

No comments yet. Be the first.