Archive

Posts Tagged ‘development’

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