implementation of dijsktra’s algorithm in parallel

11
Implementation of Dijsktra’s Algorithm in Parallel Meenakshi Muthuraman #5009 7719 Priyanka Kulkarni #5009 8043

Upload: meenakshi-muthuraman

Post on 18-Jul-2015

70 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Implementation of dijsktra’s algorithm in parallel

Implementation  of  Dijsktra’s  Algorithm  

in  Parallel Meenakshi Muthuraman #5009 7719

Priyanka Kulkarni #5009 8043

Page 2: Implementation of dijsktra’s algorithm in parallel

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)

Page 3: Implementation of dijsktra’s algorithm in parallel

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|)

Page 4: Implementation of dijsktra’s algorithm in parallel

Pseudo  code  of  Dijkstra’s  Algorithm  

Page 5: Implementation of dijsktra’s algorithm in parallel

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

Page 6: Implementation of dijsktra’s algorithm in parallel

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

Page 7: Implementation of dijsktra’s algorithm in parallel

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

Page 8: Implementation of dijsktra’s algorithm in parallel

 

0

2

4

6

8

10

12

14

16

18

100 1000 5000 10000 15000 20000 25000

SpeedUP  MPI  2*4

Page 9: Implementation of dijsktra’s algorithm in parallel

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

Page 10: Implementation of dijsktra’s algorithm in parallel

Conclusions  and  Deductions •  Generating the random graphs was a challenge •  MPI outperformed the serial and Hadoop •  MPI is the winner !!

Page 11: Implementation of dijsktra’s algorithm in parallel

Thank  You    

Any  Questions?