A parallel program which randomly generates a graph, then runs Dijkstra's algorithm on it.
The serial version of the code can be be tested with Ceedling and its Unity testing framework:
- Install the ceedling gem:
$ gem install ceedling
- Set up the ceedling environment:
$ ceedling new .
- Run the tests:
$ rake test:all
$ make pdijkstra
$ target/pdijkstra <size> <b> <max_weight> <seed> <nthreads>
Parameter | Description |
---|---|
size | Number of vertices in the generated graph. |
b | Probability (0.0 to 1.0) that a given pair of vertices will have an edge. |
max_weight | Maximum edge weight. |
seed | Seed to use for randomly generating the graph. |
nthreads | Number of threads to use. |