Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2011
Measure performance of serial implementation of the Dijkstra all-pairs shortest paths algorithm.
Setting Up
1) Copy file of the serial program Dijkstra_serial.cpp from directory classfiles\Lab07\Templates to directory classfiles\Lab07\Dijkstra_serial. 2) Add Intel compiler to the PATH environment variable: export PATH=$PATH:/opt/intel/compilers/bin
2) Run the application (Dijkstra_serial.exe). Record elapsed time:____________________________________________________. Repeat 2) at least 5 times and find average:_________________________________. 3) Repeat with different graphs sizes (up to 5000). To do this open source file (Dijkstra_serial.cpp) with notepad text editor and change line: const int N = 500;
Activity 2 OpenMP parallel solution of the Dijkstra all-pairs shortest paths algorithm
Time Required Objective Fifteen minutes
Measure performance of OpenMP parallel implementation of the Dijkstra all-pairs shortest paths algorithm.
Setting Up
Copy file of the OpenMP parallel program Dijkstra_tasks.cpp from classfiles\Lab07\Templates to directory classfiles\Lab07\Dijkstra_tasks. directory
2) Run the application (Dijkstra_tasks.exe). Record elapsed time:____________________________________________________. Repeat 2) at least 5 times and find average:_________________________________. 3) Change number of threads to 2. Repeat 2) at least 5 times and find average:_________________________________. 4) Repeat 3) for a set of numbers of threads. 5) Plot data on the diagram speedup vs. number of threads.
6) Repeat with different graphs sizes (up to 5000). To do this open source file (Dijkstra_tasks.cpp) with notepad text editor and change line: 7) Compare results of Activities 1 and 2. Make a conclusion about efficiency of both versions.
Measure performance of serial implementation of the Floyds all-pairs shortest paths algorithm.
Setting Up
Copy file of the serial program Floyd_serial.cpp from classfiles\Lab07\Templates to directory classfiles\Lab07\Floyd_serial. directory
2) Run the application (Floyd_serial.exe). Record elapsed time:____________________________________________________. Repeat 2) at least 5 times and find average:_________________________________. 3) Repeat with different graphs sizes (up to 5000). To do this open source file (Floyd_serial.cpp) with notepad text editor and change line: const int N = 500;
Activity 4 OpenMP parallel solution of the Floyds all-pairs shortest paths algorithm
Time Required Objective Fifteen minutes
Measure performance of OpenMP parallel implementation of the Floyds all-pairs shortest paths algorithm.
Setting Up
Copy file of the OpenMP parallel program Floyd_tasks.cpp from classfiles\Lab07\Templates to directory classfiles\Lab07\Floyd_tasks. directory
2) Run the application (Floyd_tasks.exe). Record elapsed time:____________________________________________________. Repeat 2) at least 5 times and find average:_________________________________. 3) Change number of threads to 2. Repeat 2) at least 5 times and find average:_________________________________. 4) Repeat 3) for a set of numbers of threads. 5) Plot data on the diagram speedup vs. number of threads.
6) Repeat with different graphs sizes (up to 5000). To do this open source file (Floyd_tasks.cpp) with notepad text editor and change line: const int N = 500;
7) Compare results of Activities 1 and 2. Make a conclusion about efficiency of both versions.