The Hardware Performance Monitor (HPM) Toolkit from IBM's
Advanced Computing
Technology Center (ACTC) is available on NCSA's IBM p690
system (Copper).
The toolkit contains utilities and a library
that allow you to access the hardware performance counters on
the processor in order to accurately measure the performance
of your application. It can be used with both serial and parallel
applications. HPM Toolkit was developed by Luiz DeRose of ACTC.
The official IBM web site for the HPM Toolkit is located at:
http://www.alphaworks.ibm.com/tech/hpmtoolkit/
The HPM Toolkit consists of three components:
- hpmcount
-
A command-line utility that you can invoke on an unmodified executable
(no source code changes, recompilation, or relinking required) to measure
several types of hardware performance events for your application as a
whole. Performance counter access is implemented through direct calls to the
PMAPI kernel interface on AIX.
- libhpm
-
A library (callable from Fortran, C, and C++) that enables you to
selectively control the collection of hardware performance data by
inserting calls to the library at appropriate points in your
application source.
- hpmviz
-
A visualization utility that allows you to graphically browse the
output of a program instrumented with
libhpm. You
must use the libhpm library, not hpmcount,
to obtain input files suitable for use with hpmviz.
The HPM Toolkit is installed on NCSA's p690 systems in
the directory:
/usr/apps/tools/hpm
On the p690, the most recent version of the toolkit is
available through a symbolic link "hpm", for example:
/usr/apps/tools/hpm/hpm/pwr4/bin/hpmcount a.out
HPM utilities (hpmcount, hpmviz) are located under the
subdirectory arch/bin,
include files for libhpm routines under
include, and the HPM libraries themselves
under arch/lib (arch is dependent on
the system you're using and will be pwr4 on the p690).
The easiest way to take advantage of the HPM Toolkit is to simply
invoke hpmcount, supplying your executable (and any
arguments that it accepts) on the command line. For example,
copper % hpmcount myprog
By default (on AIX), this will count and report a number of
statistics relating to floating-point
operations and loads/stores executed by
myprog.
hpmcount provides several other pre-defined performance events that
may be of interest; you can obtain a listing of these event sets (as
well as other options accepted by
hpmcount) by checking
the utility's help message, as follows:
copper % hpmcount -h
Complete information about using
hpmcount is
available in the reference manual (see below).
The HPM Toolkit includes the
HPM Toolkit Reference Manual
that you can read online to learn
more about the capabilities and use of this software.
You may also find a technical report describing the use of the
HPM Toolkit written by Joachim Hein of EPCC/University of Edinburgh
to be helpful in understanding this performance analysis
software:
Using the Hardware Performance Monitor Toolkit on HPCx.