[TAU Logo]


TAU Demo

TAU (Tuning and Analysis Utilities) is a visual programming and performance analysis environment for pC++. It is based on Sage++ and implemented using Tcl/Tk.

To start the TAU tools go to the directory containing the project (SAGEROOT/TestSuites/Grid) and invoke
% tau &

A file selector window appears, allowing you to create a new project or load an old one, as well as specify a remote host for execution.

Simply highlight the project file Grid.pmf and click the Okay button.

The main TAU window appears, displaying information about your project, including the names of all source code files. Options on the File menu allow us to add and remove source code from the project and set project options. The main TAU window also provides buttons for launching each of the TAU tools.

Click on the COSY button to start the compile manager tool.


COSY (COmpile manager Status displaY)

Cosy provides an interface for the compilation and execution of programs. Parameters and options for the compiling process and for program run may be chosen. Cosy automatically connects, if necessary, to the remote machine, executes the appropriate commands, and displays the resulting output in a scrollable window.

If more than one old Makefiles exist in the current directory, you will be asked to choose one. If so, choose Makefile. Build the default Makefile for the project by clicking on the build button.

Now that the Makefile is built, we can compile the project easily.

First, clean up the build directory by selecting the target realclean and clicking Make Target. Then click on Make All to compile the project.

In addition, the File menu allows us to choose from alternate build targets, postprocess trace files, and view the status of job scheduling queues configured on the host machine. Compilation and execution parameters may be modified from the Options menu, or by highlighting a specific target and using the Set Options button.

To continue, pull down the Toos menu and choose SPIFFY to launch the source code editor tool.


SPIFFY (Structured Programming Interface and Fancy File displaY)

Spiffy is a full featured editor, allowing you to edit and browse your source files using a subset of hypertext features found in FANCY.

Click on grid_block.pc which will open the source code for editing. In the editor window that appears, use Find ,from the Edit menu, to search for Processor_Main .

Click Search and to move the text to the first occurrence of Processor_Main and click Cancel in the Find dialog box.

Use the mouse to highlight Grid in the class variable definition of the collection G, then click the HyperSelect button.

The demonstrates the class and function browsing capabilities of the editor. A list of all class and function definitions of Grid will appear for selection.

Choose the class by double clicking it. When the editor jumps to the class definition, introduce an error by changing the word Collection to Bogus and then saving it, using Save from the File menu.

Recompile the project by clicking the Build button in the SPIFFY editor window.

This demonstrates one of the paradigms of TAU, tools that can invoke features of each other to easily accomplish a tasks. The COSY window is brought forward and a rebuild begins. COSY detects the compilation error and highlights it in red in the output portion of the window.

Click on the highlighted error in COSY window. It raises the SPIFFY editor window and highlights the selected error.

Fix the error and save the file. Recompile once more using the Build button and, when finished, close the editor window with the Close button. Start the next tool, FANCY from SPIFFY's Tools menu and then exit SPIFFY from its main file window.


FANCY (File ANd Class displaY)

Fancy lets you browse through the files, functions, classes and methods used in the source text of the application using a hypertext-like interface.

The main FANCY window consists of selection boxes for the pc++ language objects: files, functions, classes (including collections), and methods.

Click on Grid in the class portion of the window.

After a pause while it loads browsing information from the Object Manager you get a list of methods in the class Grid. You can click a method to browse its definition.

Click on LocalBroadcast method.

The FANCY file viewer appears with the selected method highlighted.

You can browse around the source code as if it were hyper-linked. For example, in the LocalBroadcast member function that we just highlighted, we can click on the highlighted ElemIndex function call to view the definition of ElemIndex .

Click on the highlighted call to ElemIndex in the source code.

You can click on the greyed out areas to highlight the source of each function or class. You can also hit the Back button to take you back to the previously browsed functions or classes.

Next, we start CLASSY from FANCY's Tools menu, leaving FANCY running.


CLASSY (CLASS hierarchY browser)

Classy displays the class hierarchy defined in the current user application.

Click on Kernel and SuperKernel nodes to view their subclasses.

The class hierarchy browser, CLASSY allows quick access to key properties of a class. pC++ collections are marked with a "||" before the name.

You can expand a superclass by clicking the left mouse button. Clicking the right button will globally select it in other tools that are active.

Click the node for the DistributedArray with the right button to display the class in other tools. Here, fancy will show the source code for the class DistributedArray .

Before exiting from CLASSY, start CAGEY from the Tools menu.


CAGEY (CAll Graph Extended displaY)

Cagey lets you browse through the static callgraph of the application.

Expand the callgraph to level 3 by choosing Expand Graph ... up to level 3 in the View menu.

This will expand all nodes in the call graph down to three function calls from the Processor_Main function. Individual nodes may be expanded or contracted by a single left mouse button click on the node.

Individual nodes may be expanded or contracted by a single left mouse button click on the node. We can globally select functions in other tools by right-clicking, as in classy. We can click the middle button to view detailed information about the function.

To display in a compact form, click Compact callgraph in the View menu. Then scroll to Grid::Grid, the Grid collection constructor function, and click the middle mouse button on its label to view information on the function.

Next we demonstrate RACY. To use RACY, we need to build the application with profiling for which we go back to COSY.

Exit from CAGEY and find the window for COSY.


RACY (Routine and data ACcess profile displaY)

After compiling an application for profiling and running it, racy lets you browse through the function and collection profile data generated.

In cosy, click on the checkbutton for Profiling compilation mode, rebuild the Makefile with the Build button, and click Make All to recompile the project for profiling. Then run the instrumented program to obtain dynamic profiling data by clicking the Run button.

Go to RACY in the Tools menu to invoke it. Go to File and Show Legend to view the color-coding key for profiled functions.

To investigate the profile of a function, in the File Legend click on Grid::r_update.

The window that appears contains profiles for the function on each node, and aggregated over all nodes (showing mean, min, and max time).

Clicking on the node 0 label in either the Grid::r_update profile window or the function portion of the main window shows us the time spent in each function for node 0.

Click the right button on the Grid::Ap in the node 0 profile window to investigae this function, which we observe to have consumed the most runtime.

This right-click will globally select the function in all running tools. With FANCY still running, we will be shows the source code for the selected function, allowing us to investigate methods of optimization.

As in the other tools, we can click the middle mouse button to get function information. Furthermore, the Options and Mode menus contain numerous ways to reconfigure the profile displays.


This concludes the guided tour of TAU. Choosing Exit from main TAU window will cause all running tools to exit.

Continue with the next button below for links to further in-depth information about TAU.


[Back to tutorial] [NEXT]
Sameer Shende <sameer@cs.uoregon.edu>