QUESTION:
You are given as starter code a program that calculates a value for pi. This starter code is provided at the bottom of the challenge in the "OpenCL Pi starter zip file".
You should first download this file, read the README and the beginning comment in the opencl-pi.c file to understand how the program works, use the Makefile to build the program, and run the program to see the default value of pi given.
Next, you should become familiar with the code in the "OpenCL Heat solution zip file" at the bottom of the challenge, which provides an example of using OpenCL. This is based on the HPCU "OpenCL Heat" challenge problem, which you are encouraged to review:http://hpcuniversity.org/students/weeklyChallenge/95/
Finally, you should change the "OpenCL Pi starter zip file" code to run an OpenCL program, in which the entire simulation of calculating pi is carried out by an OpenCL kernel N times, where N is the value for the work group size given by clGetKernelWorkGroupInfo().
Within the OpenCL kernel, you should use get_global_id(0) as the value for the number of rectangles used for an individual copy of the simulation. The kernel should produce an output buffer with N items, each of which contains the value of pi for a given simulation.
The result of running your program should look something like the opencl-pi.out file.
Your solution should also update the README to include a description of the system you used to run OpenCL, as well as any setup instructions one would need to follow to run your code on a similar system.
SOLUTION:
Will be posted April 20, 2015
LINK:
http://hpcuniversity.org/students/weeklyChallenge/96