Monday March 16, 2015
This problem challenges you to make use of the OpenCL parallel programming standard.
Similar to CUDA, OpenCL provides a standard for parallel programming in which computations are performed by "devices." In the case of OpenCL, these devices can be CPUs or GPGPUs (general purpose graphics processors).
Your challenge is to obtain access to a system with OpenCL (e.g. your own computer with OpenCL installed), write a program that prints out information about all of the OpenCL "platforms" and "devices" on that system, run the program on the system, and save the output.
A solution will consist of the source code for the program you wrote; an output file generated by running the program; and a README file listing the operating system(s) for which you wrote the program to work, how to install OpenCL on the operating system(s), and how to compile and run the program.
Your output file should have the following format (replacing [] with actual values):
Platform Count: []
_Platform [id]_
Platform Profile: []
Platform Version: []
Platform Name: []
Platform Vendor: []
Device Count: []
_Device [id]_
Device Profile: []
Device Version: []
Device Name: []
Device Vendor: []
Device is [available or unavailable].
Device compiler is [available or unavailable].
_Device [id]_
Device Profile: []
Device Version: []
...
_Platform [id]_
...
_Device [id]_
...
OpenCL defines functions for obtaining the information above about platforms and devices. Documentation on these for the C language is provided below.
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetPlatformIDs.html
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetPlatformInfo.html
In your program, you can assume that the maximum length of a string is 80 characters, the maximum number of platforms is 4, and the maximum number of devices per platform is 4.
For your reference, a sample output file is provided below in the "OpenCL Info sample output" file. This is the output upon running a program on a 15-inch, Early 2011 Macbook Pro running OS X 10.7.5.
Your challenge is to obtain access to a system with OpenCL (e.g. your own computer with OpenCL installed), write a program that prints out information about all of the OpenCL "platforms" and "devices" on that system, run the program on the system, and save the output.
A solution will consist of the source code for the program you wrote; an output file generated by running the program; and a README file listing the operating system(s) for which you wrote the program to work, how to install OpenCL on the operating system(s), and how to compile and run the program.
Your output file should have the following format (replacing [] with actual values):
Platform Count: []
_Platform [id]_
Platform Profile: []
Platform Version: []
Platform Name: []
Platform Vendor: []
Device Count: []
_Device [id]_
Device Profile: []
Device Version: []
Device Name: []
Device Vendor: []
Device is [available or unavailable].
Device compiler is [available or unavailable].
_Device [id]_
Device Profile: []
Device Version: []
...
_Platform [id]_
...
_Device [id]_
...
OpenCL defines functions for obtaining the information above about platforms and devices. Documentation on these for the C language is provided below.
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetPlatformIDs.html
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html
https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetPlatformInfo.html
In your program, you can assume that the maximum length of a string is 80 characters, the maximum number of platforms is 4, and the maximum number of devices per platform is 4.
For your reference, a sample output file is provided below in the "OpenCL Info sample output" file. This is the output upon running a program on a 15-inch, Early 2011 Macbook Pro running OS X 10.7.5.
Show solution
Challenge Resources:
OpenCL Info sample output
—
Sample output file for the "OpenCL Info" challenge problem from a working program running on a 15-inch, Early 2011 Macbook Pro running OS X 10.7.5
OpenCL Info solution
—
Solution zip file for the OpenCL Info challenge problem containing C code, a Makefile, a generated output file, and a README.
©1994-2024
|
Shodor
|
Privacy Policy
|
NSDL
|
XSEDE
|
Blue Waters
|
ACM SIGHPC
|
|
|
|
|
|
XSEDE Code of Conduct
|
Not Logged In. Login