Solving graph colouring problem using Fine-Grained Locks in c++.
you have to implement a parallel greedy graph colouring algorithm where
each thread is assigned a partition. You consider the number of threads k as one of the
parameters. All the vertices (n being the total number of vertices) in the graph are randomly
partitioned into p partitions and each partition is assigned to a thread. Note that unless mentioned
otherwise, you can assume that p is equal to k.
Input to the program will be a file, named input_params.txt, consisting of the number of
threads followed by the no. of vertices in the graph. From the next line, there should be the
representation of the graph in adjacency matrix format. The sample input file is as follows:
2 5
1 2 3 4 5
1 0 0 0 1 0
2 0 0 0 1 1
3 0 0 0 0 1
4 1 1 0 0 1
5 0 1 1 1 0
Comments
Leave a comment