03 August 2020 10:01:22 PM
DIJKSTRA_OPENMP
C version
Use Dijkstra's algorithm to determine the minimum
distance from node 0 to each node in a graph,
given the distances between each pair of nodes.
Although a very small example is considered, we
demonstrate the use of OpenMP directives for
parallel execution.
Distance matrix:
0 40 15 Inf Inf Inf
40 0 20 10 25 6
15 20 0 100 Inf Inf
Inf 10 100 0 Inf Inf
Inf 25 Inf Inf 0 8
Inf 6 Inf Inf 8 0
P0: Parallel region begins with 1 threads
P0: First=0 Last=5
P0: Connecting node 2.
P0: Connecting node 1.
P0: Connecting node 5.
P0: Connecting node 3.
P0: Connecting node 4.
P0: Exiting parallel region.
Minimum distances from node 0:
0 0
1 35
2 15
3 45
4 49
5 41
DIJKSTRA_OPENMP
Normal end of execution.
03 August 2020 10:01:22 PM
03 August 2020 10:01:22 PM
DIJKSTRA_OPENMP
C version
Use Dijkstra's algorithm to determine the minimum
distance from node 0 to each node in a graph,
given the distances between each pair of nodes.
Although a very small example is considered, we
demonstrate the use of OpenMP directives for
parallel execution.
Distance matrix:
0 40 15 Inf Inf Inf
40 0 20 10 25 6
15 20 0 100 Inf Inf
Inf 10 100 0 Inf Inf
Inf 25 Inf Inf 0 8
Inf 6 Inf Inf 8 0
P0: Parallel region begins with 2 threads
P1: First=3 Last=5
P0: First=0 Last=2
P1: Connecting node 2.
P1: Connecting node 1.
P1: Connecting node 5.
P1: Connecting node 3.
P1: Connecting node 4.
P1: Exiting parallel region.
Minimum distances from node 0:
0 0
1 35
2 15
3 45
4 49
5 41
DIJKSTRA_OPENMP
Normal end of execution.
03 August 2020 10:01:22 PM
03 August 2020 10:01:22 PM
DIJKSTRA_OPENMP
C version
Use Dijkstra's algorithm to determine the minimum
distance from node 0 to each node in a graph,
given the distances between each pair of nodes.
Although a very small example is considered, we
demonstrate the use of OpenMP directives for
parallel execution.
Distance matrix:
0 40 15 Inf Inf Inf
40 0 20 10 25 6
15 20 0 100 Inf Inf
Inf 10 100 0 Inf Inf
Inf 25 Inf Inf 0 8
Inf 6 Inf Inf 8 0
P2: Parallel region begins with 4 threads
P0: First=0 Last=0
P2: First=3 Last=3
P3: First=4 Last=5
P1: First=1 Last=2
P2: Connecting node 2.
P2: Connecting node 1.
P2: Connecting node 5.
P2: Connecting node 3.
P2: Connecting node 4.
P2: Exiting parallel region.
Minimum distances from node 0:
0 0
1 35
2 15
3 45
4 49
5 41
DIJKSTRA_OPENMP
Normal end of execution.
03 August 2020 10:01:22 PM
03 August 2020 10:01:22 PM
DIJKSTRA_OPENMP
C version
Use Dijkstra's algorithm to determine the minimum
distance from node 0 to each node in a graph,
given the distances between each pair of nodes.
Although a very small example is considered, we
demonstrate the use of OpenMP directives for
parallel execution.
Distance matrix:
0 40 15 Inf Inf Inf
40 0 20 10 25 6
15 20 0 100 Inf Inf
Inf 10 100 0 Inf Inf
Inf 25 Inf Inf 0 8
Inf 6 Inf Inf 8 0
P3: Parallel region begins with 8 threads
P7: First=5 Last=5
P5: First=3 Last=3
P4: First=3 Last=2
P3: First=2 Last=2
P1: First=0 Last=0
P0: First=0 Last=-1
P6: First=4 Last=4
P2: First=1 Last=1
P7: Connecting node 2.
P4: Connecting node 1.
P5: Connecting node 5.
P3: Connecting node 3.
P5: Connecting node 4.
P1: Exiting parallel region.
Minimum distances from node 0:
0 0
1 35
2 15
3 45
4 49
5 41
DIJKSTRA_OPENMP
Normal end of execution.
03 August 2020 10:01:22 PM