Archive

Archive for September, 2020

Day 5 — Tutorial #1 Complete and Research Findings

September 6th, 2020 1 comment

Hi, all. Welcome back to ICOC.

Today was a somewhat slow day. I decided to do a little bit of work towards the project, but not much — mostly some research.

However, Dr. Marmorstein contacted me about the driver update, and while the drivers were finished with the update, the error that was causing the Erik Smistad tutorial to fail was not an issue with the driver, but a bug in the program. The output vector, C, was accidentally given the const prefix. After that was fixed, the program ran correctly. Every print out of the program, where each element of A at i was incrementing by 1 from 0 until 1024, and every element of B at i was decrementing by 1 from 1024 until 0, equated to 1024.

I had begun looking into the other tutorial from Rob Farber, when Dr. Marmorstein shared with me a GitHub repository from a user whr, entitled “clblake.” It appears to be a very similar project to the one being conducted here, except rather than using BLAKE2, whr chose to use BLAKE256, instead. Regardless, given how closely the project resembles ours, we’re adding whr’s clblake repository as a “Previous Work” credit.

That was everything done today. Again, a shorter day, but next time, I will be implementing the Rob Farber tutorial as my second and final tutorial. Then, it’s time to start with the real project!

Thank you, and see you next time!

Kyle Jenkins.

Time spent today: 1 hour
Total Time: 5 hours

Day 4 — Tutorial and Driver Update

September 5th, 2020 Comments off

Hi, all, welcome back to ICOC.

On the agenda today was scouring the web for tutorials to get familiarized with the OpenCL standard, and so far, I’ve found two tutorials that I want to try. One tutorial was written by a members of the Khronos Group, Rob Farber (which we’ll talk about later, but here’s a link now.), while the other was written by Erik Smistad.

The first tutorial I decided to implement was the one written by Erik Smistad, titled “Getting started with OpenGL and GPU computing.” This was an example that Dr. Marmorstein highlighted as we were forming the research project. The tutorial aims to add vectors contents together. While this can be done easily with a simple for loop, Smistad chooses to implement it using the OpenCL standard to allow for GPU computing. This will decrease the time it takes to compute the vector addition from linear, or O(n) with n being the size of the vectors, to relying on the number of cores in the processor instead, which can speed up the computation time.

Following Smistad’s guide, I was able to replicate this vectorAddition program, having created a main program and a kernel program to which the computation would occur in the GPU. The only issues that needed to be addressed were the facts that the OpenCL function “clCreateCommandQueue” is deprecated, and needed to be replaced with “clCreateCommandQueueWithProperties”, and the fact that the lab system I was using did not have an updated driver. Dr. Marmorstein is updating the drivers in all of the lab systems, which should fix that problem. Thankfully, one of the lab systems had the driver partially installed, so a remote login allowed me to compile the program.

Running the program, another problem appeared — when the program runs, the program will print out the given item at i in both vectors A and B, add them together, and print the result C in one line. However, all of the additions are wrong. They are either zero, or a ridiculously high number. At the moment, this does not appear to be user error, as Dr. Marmorstein was able to confirm the error, as well. Here’s hoping that the driver update will help this error somewhat…

That being said, that is all of the progress today. Tomorrow will be a day to work on more research and make sure that this tutorial is completed successfully.

Thank you, and see you next time!

Kyle Jenkins.

Time spent today: 1 hour 15 minutes
Total Time: 4 hours

Day 3 — Set Up Complete

September 3rd, 2020 1 comment

Hi, all. Welcome back to ICOC.

Today was the day I worked to try and identify and solve why some of the tests for the header files of OpenCL failed to work. After digging through the files, the error was simply that I was not compiling the files correctly.

In retrospect, compiling every file individually and running these files to see if they passed was not a good choice. I went to Dr. Robert Marmorstein for advice, as I initially thought that it was simply an error on my end — either my system was not equipped with the necessary files, or I was not compiling correctly. It seems that the latter was correct, and with the cmake command, I was able to compile and successfully run each and every test header file.

Now that the header files are complete, next time will be devoted to making sure all of the necessary OpenCL files are ready to go, and if they are, search online for OpenCL tutorials to become familiar with the standard!

See you next time!

Sincerely,
Kyle Jenkins.

Time spent today: 1 hour 15 minutes.
Total Time: 2 hours 45 minutes.

Categories: Uncategorized Tags: ,

Day 2 — Set Up

September 1st, 2020 1 comment

Hello, all.

Today, I began setting up my system to be compatible for OpenCL.

I was having a bit of trouble finding materials and guides online, as results online did not paint a clear picture on where to find the necessary programs I needed. I wanted to find a Windows version, in case working on this project from a Linux system was impossible.

In my research, I managed to find the OpenCL repository from The Khronos Group on GitHub. I lifted the OpenCL-CCX and OpenCL-Headers repositories and migrated them to the Linux system. The Headers repository, in particular, has a directory filled with tests, that are designed to test the OpenCL header files so that they are working as intended. When running all the tests, all but four passed correctly. Three of them, unfortunately, did not compile correctly, while one of them ran successfully but did not pass.

Next time, I will continue to set up OpenCL on the system, with the main goal of the header tests working. Until then, see you next time!

Sincerely,
Kyle Jenkins.

Time spent today: 1 hour 30 minutes.
Total Time: 1 hour 30 minutes.

Categories: Uncategorized Tags: ,