Timing and Profiling MP Program
- To obtain timing information for an MP program
- setenv OMP_NUM_THREADS n
- time a.out
- example:
n=1 time output:
9.678u 0.091s 0:09.86 98.9% 0+0k 0+1io 0pf+0w
n=2 time output:
10.363u 0.121s 0:05.72 183.2% 0+0k 3+8io 3pf+0w
from this output we derive the following performance data:
processors User+System Elapsed
1 9.77 9.86
2 10.48 5.72
therefore the parallel overhead is 7.3%, the Speedup is 1.72
- use Speedshop to obtain profiling information for an MP program
- setenv OMP_NUM_THREADS n
- ssrun -exp pcsamp a.out
- each thread will create a separate (binary) profiling file
- foreach file (a.out.pcsamp.*)
- prof $file
- end