This is a term project for the UT multi-core computing class.
It provides a parallel implementation of Dijkstra's shortest path algo as detailed in a paper [2].
Graphs are represented as positive weighted adjacency matricies. a weight of 0 notes that there is no edge. No negative weights are allowed.
To see the difference in compute time vs the CPU:
- switch to directory src
make timeTest
./timeTest
To verify results of random Graphs:
- switch to directory src
make funcTest
./funcTest
To run a demo with an adjacency matrix from a file:
- switch to directory src
make demo
./demo <fileName>
This shows the time taken on the GPU vs the CPU algo as we vary the graph size. This includes initializing the GPU and copying data from host to device and back again.
The program assumes adjacency matricies will be in the format where n
is the number of nodes, and s
is the source node.
n
s
<row 1 (data assumed to be n x n)>
<row 2>
<... >
<row n>
- This make file assumes a cuda GPU compatible with compute_60
- Nvidia's cuda toolkit
- g++7