Plotting a speedup graph
A first step in performance analysis consists in evaluating the "baseline" performance of the application. To do this, we will plot a speedup graph.
- Run the mandelbrot application while varying the number of OpenMP threads
- Create a .data file that contains:
- the number of processors in the first column
- the sequential execution time in the second column
- the parallel execution time in the third column
- Open the file speedup.plot and modify:
- the plot title
- the output file that ends with .png
- the input file that ends with .data
- Run the gnuplot command:
- This generates the output png file. For example SpeedUpMandelbrot-OpenMP.png.
- Run the program with perf record
- Analyze the results with perf report
Tracing an OpenMP program
While viewing the trace, you should see a load balancing problem (the same one you spotted during the parallel algorithmics lab). Fix the program and regenerate a trace showing that the load is balanced between threads.
Then rerun the performance measurement, and integrate the new data in the speedup plot (which will thus include 2 graphs: the "original" speedup graph and the speedup graph after optimization).
Tracing an MPI program
Now that you master a few performance analysis tools, use them on your micro-project, and improve its performance !