Tuning and Analysis Utilities

TAU

PRL

[Pooma Logo]


Blitz++ is a C++ class library for scientific computing which provides performance on par with Fortran 77/90. It uses template techniques to achieve high performance. The current versions provide dense arrays and vectors, and small vectors and matrices.

Settings

To use TAU, please include the $(TAUDIR)/include/Makefile to the blitz library makefile, and add $(TAUDEFS), $(TAUINC) and $(TAULIBS) to the CFLAGS, INCLUDE and LIBS in the Blitz++ makefile. The applications that use Blitz++ profiled library should do likewise.

Profiling and Tracing Expression Templates using TAU

[blitz

Blitz++ can describe expression template kernels to TAU using pretty printing. This allows us to see the time spent in expressions such as "A=B+C+D" instead of lengthy template routine names generated by the compiler.

[symbol

List of symbols for visualising Blitz++ event traces in Vampir format.

[timeline]

Vampir showing the timeline display of Blitz++ expression templates.

Extensible Programming Tools

"Libraries typically have two (or more) layers: there are user-level classes and functions, and behind them are one or more implementation layers. Using tools such as debuggers and profilers with large libraries is troublesome, since the tools make no distinction between user-level and implementation code. For example, a user who invokes a debugger on an array class library will be confronted with many irrelevant (and undocumented) private data members, when all they wanted to see was the array data. Using a profiler with such a library will expose many implementation routines, instead of indicating which array expressions were responsible for a slow program. This problem is compounded when template libraries are used, with their long symbol names and many instances.

The solution may be extensible tools, which provide hooks for libraries to define customized support for debugging, profiling etc. An example of such interaction is Blitz++ and the Tau profiling package. Tau is unique in that it allows libraries to instrument themselves. This allows Blitz++ to hide implementation routines, and only expose user-level routines. Time spent in the library internals is correctly attributed to the responsible user-level routine. Blitz++ describes array evaluation kernels to Tau using pretty-printing. When users profile applications, they do not see incomprehensible expression template types; rather they see expressions such as "A=B+C+D".

If debuggers provided similar hooks, users could debug scientific codes by looking at visualizations and animations of the array data. The general goal of such tool/library interactions is to provide a user-oriented view of libraries, rather than an implementation-oriented view."

(From: Todd L. Veldhuizen and Dennis Gannon, Active Libraries: Rethinking the roles of compilers and libraries. Proceedings of the SIAM Workshop on Object Oriented Methods for Inter-operable Scientific and Engineering Computing (OO'98), Yorktown Heights, New York, October 21-23, 1998.)

Acknowledgements

We gratefully acknowledge the work done for profiling expression templates by Todd Veldhuizen.