Analyzing Program Performance With Sun WorkShop

Loop Analysis Tools

Many compute-intensive Fortran applications exhibit loop-level parallelism, where computations are performed over large datasets in loops. Sun WorkShop lets you use this parallelism through automatic parallelization of FORTRAN 77, Fortran 90, and C programs. Use the compiler to parallelize loops in your program. Use LoopTool or LoopReport to examine loops parallelized by the FORTRAN 77, Fortran 90, or C compiler.

LoopTool

LoopTool is a graphical analysis tool that reads the loop timing files created by programs compiled for loop analysis with Fortran and C compilers. LoopTool enables you to:

LoopTool displays a graph of loop run times and identifies which loops were parallelized. You can go directly from the display to the source code for any loop.

To use LoopTool, you compile your program with the -Zlp option. When you run a program that has been compiled with the -Zlp option, Sun WorkShop creates a loop timing file. You run LoopTool to read the timing file and display its results. Sun WorkShop provides a demonstration program named vgam and a demonstration timing file named vgam.looptimes. When you start LoopTool from the Sun WorkShop Tools menu, it displays results from these files. You can use these demos to become familiar with LoopTool or specify your own files if you have already compiled a program with the -Zlp option. LoopTool is described in Chapter 3, Loop Analysis Tools.

LoopReport

LoopReport is the command line version of LoopTool. LoopReport produces an ASCII file of loop times instead of a graphical display. LoopReport is described in Chapter 3, Loop Analysis Tools.