the more-or-less current sourcecode can be downloaded here, or can be browsed here
hpsum is a small command line program that analyzes/benchmarks the hardware performance of an arbitrary application. It can report data such as total processor cycles, floating point operations completed per second, various types of cache hit and miss statistics, and more (see the file POWER3-II.evs for a full list). Although the program itself does not use any MPI functionality, it is mainly intended for use on MPI programs, as there is already a more functional and complete benchmarking program for non-parallel command-line programs on AIX, hpmcount.
(a more detailed page on usage can be found here)
hpsum utilizes IBM's PMAPI, a performance monitoring API. Using PMAPI, up to 8 different types of events can be recorded and quantitized per instance of the program. To work for MPI-based applications, an instance of the program is farmed out to every node by a the call to poe that would normally farm out the instances of the MPI-application, and each of these tasks then initializes the system counters for their respective processors, and make a subsequent system() call, launching the actual program. Each task-instance of hpsum records its information into a file, which is stored in a directory unique for every instance of an MPI program.
Upon completion of the MPI program, every instance of hpsum unanimously elect one instance to take the role of the master task, which then make a system() call on the perl script hpsum-summary.pl, which is responsible for the tallying of the information into a concise summary for the events counted, as opposed to the hundreds or thousands of lines of data recorded by the instances of hpsum.
Also, included with the hpsum package is hpsum-plot.pl. hpsum-plot.pl is a small perl-based script to be used as a frontend to plotting the data into gnuplot, a (not included) graphical data plotting tool.
I suppose the question might arise: "why bother using hpsum when other programs are already out there, such as hpmcount?" Well, there are a few reasons one might want to consider using this program as an alternative to hpmcount:
I believe the biggest area for improvement would be in the displaying of data. While gnuplot is a simple and easy solution (leaving more time for the actual problem), it's limited in what it can and can't do. For example, it would be very helpful to be able to click and select a single point on the plot to get a small amount of extended information (nodename, task id, time, et c.). Of course reporting more information would also be nice (see the file named README in the source directory for why this hasn't already been done).