CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

14
CS 591x Profiling Parallel Programs Using the Portland Group Profiler

Transcript of CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

Page 1: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

CS 591x

Profiling Parallel ProgramsUsing the Portland Group Profiler

Page 2: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

Performance and Profiling

Since parallel programming is all about performance…… we may want to study our programs in terms of their performance…and look for ways to enhance performanceIn a production application a small change may make a big difference

Page 3: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

Performance and Profiling

We could … Try running our programs on different

machines (Xeon vs. Pentium) Tweak our code and rerun rescale our application to use more

processors

MPI_Wtime()

Page 4: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

Profiling

We may want to look at our code… and see how it is performing internally… how the various pieces are performing during execution

Page 5: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

Profiling

A Profiler … A tool to examine the performance of

a program while it is executing Can examine the performance at

function/routine level… … or at line level

Page 6: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

Profiler

Profilers … can report the number of calls to a

function or line can report the percentage of call to a

function or line often have some graphics capability –

bar graphs

Page 7: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

Profiler

Profilers are often part of development tool suitesgprof – GNU’s profiler part of the gcc suite free – part of most Linux distributions gcc –pg myprog.c –o myprog

pgprof – Portland Group Profiler part of the Portland Group Cluster

Development kit

Page 8: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

pgprof

Analyzes/reports performance data based on program executionMust add profile data collection calls to your codeprofiling calls can effect performance but relative performance should be consistentOptimization can impact profiling

Page 9: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

pgprof

Must compile/link code with -Mprof= option -Mprof=func -Mprof=lines -Mprof=mpi -Mprof=lines,mpi

Page 10: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

pgprof

… then execute as normalproduces profile data file(s)….. pgprof.out …… then runpgprof [pgprof.out]

Page 11: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.
Page 12: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.
Page 13: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.
Page 14: CS 591x Profiling Parallel Programs Using the Portland Group Profiler.

For more information…

http://www.pgroup.com/doc/pgitools.pdf