0

I am trying to implement a multithreaded Union-Find algorithm as outlined in this paper (https://citeseerx.ist.psu.edu/viewdoc/download?oi=10.1.1.56.8354&rep=rep1&type=pdf). Using this, I am trying to find out the number of connected components in the graph. I am using C++ on the host side and OpenCL C on the kernel side .

Unfortunately, even after writing the codes line by line from the paper, I am getting different answers everytime which clearly shows that there is some data race that is happening. Can anyone kindly look into the code and help me figure out where I am going wrong.

Thanks in advance. I have attached the code links and the data link

(https://github.com/Sayan-Chaudhuri/Graph-algorithms-using-OpenCL/blob/main/Boruvka-MST-parallel.cpp) -> host code (https://github.com/Sayan-Chaudhuri/Graph-algorithms-using-OpenCL/blob/main/Boruvka-adopted-version-alternate.cl) -> kernel code

(https://github.com/Sayan-Chaudhuri/Graph-algorithms-using-OpenCL/blob/main/USA-road-d-for-Boruvka.txt) -> input file

0 Answers0