Exercise 5: MPI + OpenMP Performance Tuning
Objective:: Investigate how different thread/process combinations affect runtime.
Tasks:
- Modify your hybrid sum program to record timestamps using MPI_Wtime(). Run with varying configurations:
- Analyze the results to identify trends in performance. Consider factors like load balancing, communication overhead, and thread contention.
- Collect runtimes and plot execution time vs. configurations.
- Discuss which configuration achieved the best performance and why (hint: consider NUMA and communication cost).
| MPI Ranks | OpenMP Threads | Expected Bahavior |
|---|---|---|
| 4 | 1 | Baseline MPI only |
| 2 | 2 | Hybrid moderate | 1 | 4 | OpenMP only |
| 4 | 4 | Fully hybrid |
Command to Practice
export OMP_NUM_THREADS=