Performance Analysis and Optimization

Last updated: Aug 19th 2009

Introduction

Performance Analysis and Optimization is a key area of High Performance Computing. On bluefire we have installed several applications for this purpose, including HPMcount, scalasca, TAU, and IPM.

HPMCOUNT
TAU
scalasca
Integrated Performance Monitoring (IPM) tool

HPMCOUNT

Use the AIX command hpmcount to analyze your code performance.

The simple way to use hpmcount is to invoke HPMCOUNT directly:

  
hpmcount my_executable

When invoked in this way, hpmcount starts your application, and when execution ends it produces a report summarizing:

For more information on how to use hpmcount, see Using HPM Toolkit: A primer for details.


TAU

TAU Performance System is a portable profiling and tracing toolkit for performance analysis of parallel programs written in Fortran, C, C++, Java, Python.

TAU (Tuning and Analysis Utilities) is capable of gathering performance information through instrumentation of functions, methods, basic blocks, and statements. All C++ language features are supported including templates and namespaces. The API also provides selection of profiling groups for organizing and controlling instrumentation. The instrumentation can be inserted in the source code using an automatic instrumentor tool based on the Program Database Toolkit (PDT), dynamically using DyninstAPI, at runtime in the Java virtual machine, or manually using the instrumentation API.

More details on TAU Performance System website.

TAU's profile visualization tool, paraprof, provides graphical displays of all the performance analysis results, in aggregate and single node/context/thread forms. The user can quickly identify sources of performance bottlenecks in the application using the graphical interface. In addition, TAU can generate event traces that can be displayed with the Vampir, Paraver or JumpShot trace visualization tools. Paraprof is available on DASG machines (Data Analysis and Visualization cluster), but we recommend to run it on the Visualization Cluster (i.e. storm) because paraprof uses OpenGL.

Running TAU on bluefire

Instrument a code with TAU and running it on bluefire is not different from doing so on other platforms. For user convenience, these are the steps to perform when running on bluefire.


Scalasca

Scalasca is an open-source toolset that can be used to analyze the performance behavior of parallel applications and to identify opportunities for optimization. It has been specifically designed for use on large-scale systems, but is also well-suited for small- and medium-scale HPC platforms. Scalasca supports an incremental performance-analysis procedure that integrates runtime summaries with in-depth studies of concurrent behavior via event tracing, adopting a strategy of successively refined measurement configurations. A distinctive feature is the ability to identify wait states that occur, for example, as a result of unevenly distributed workloads. Especially when trying to scale communication-intensive applications to large processor counts, such wait states can present severe challenges to achieving good performance.

More details on Scalasca website.

Running Scalasca on bluefire

Instrument a code with scalasca and running it on bluefire is not different from doing so on other platforms. For user convenience, these are the steps to perform when running on bluefire.


IPM

IPM instructions:

  1. Add these 3 lines to your batch run script prior to the mpirun.lsf command
      setenv MP_EUILIBPATH /contrib/ipm/lib
      setenv IPM_REPORT full
      setenv MP_SINGLE_THREAD NO
      

    MP_EUILIBPATH points to instrumented MPI library:

  2. Make the batch run

    In the run directory a file is created containing ipm profiling info. The file naming convention is:

    -rw-r--r--  1 mpage    ncar               195801 Jul 10 09:13 mpage.1247238769.558263.0
    
  3. At the command line enter:
      ipm_parse -full mpage.1247238769.558263.0
      

    This will produce a text-file profile for your review.

  4. At the command line enter:
      ipm_parse -html mpage.1247238769.558263.0
      

    This produces a directory hd3D_16_mpage.1247238769.558263.0_ipm_662332

  5. Tar the directory up and transfer to your desktop
  6. Untar on the desktop
  7. Open the file index.html in the directory with a browser