implementation of dijsktra’s algorithm in parallel
TRANSCRIPT
Implementation of Dijsktra’s Algorithm
in Parallel Meenakshi Muthuraman #5009 7719
Priyanka Kulkarni #5009 8043
Single Source Shortest Path Problem
• The Problem of finding the shortest path from a source vertex S to all vertices in the graph • Weighted graph G = (V,E)
Dijkstra’s Algorithm • Solution to single source shortest path algorithm in graph theory
o Both directed and undirected graphs o All edges must have non-negative weights o Graph must be connected o Dijkstra’s algorithm runs in O(E*lg|V|)
Pseudo code of Dijkstra’s Algorithm
0
5
10
15
20
25
30
100 1000 5000 10000 15000 20000 25000 27000
Serial Execution Time
100 1000 5000 10000 15000 20000 25000 27000 Execution time 0 0.02 0.74 3.3 7.94 13.58 21.64 25.16
Serial Execution time
0
2
4
6
8
10
12
14
16
18
20
100 1000 5000 10000 15000 20000 25000
MPI ExecutionTime as the Number of Nodes increases 1node*4tasks per node 2nodes*4tasks per node 3nodes*4tasks per node
0
1
2
3
4
5
6
7
8
100 1000 5000 10000 15000 20000 25000
EXEC
UTION TIM
E MPI Execution Time as The Number of Tasks per node is Increased
3nodes*4tasks per node 3nodes*8tasks per node
0
2
4
6
8
10
12
14
16
18
100 1000 5000 10000 15000 20000 25000
SpeedUP MPI 2*4
100 1000
5000 10000
15000 20000
25000
168 244
528
1100
1346
1642
168 333
629 642
1368
1652
Execution Time for Hadoop 2nodes*4tasks per node 3nodes*4tasks per node
Conclusions and Deductions • Generating the random graphs was a challenge • MPI outperformed the serial and Hadoop • MPI is the winner !!
Thank You
Any Questions?