The introduction of the Intel IA-64 Itanium processor brings a substantial
increase in potential speed for applications that are tuned to
run on this architecture. At the same time, the role of the
compiler has become increasingly important in realizing the
full potential of the processor (some would say "critical").
To achieve performance
commensurate with the capabilities of the IA-64 processor, developers
must be aware of those portions of their source code that
were successfully optimized by the compiler and others that might need
further attention. This requires that information revealed by the compiler
during optimization phases is readily available.
Unfortunately, this information is often not easily found or
can sometimes be difficult to comprehend.
OptView is a tool that's designed to
make it easier for developers and performance analysts to navigate
through the frequently lengthy
output contained in optimization reports produced by Intel
compilers for the Itanium processor.
OptView provides an easy-to-use and intuitive interface that allows
the user to browse through their own source code which is
automatically cross-referenced by the tool with the optimization
reports.
OptView is one of the PerfSuite tools
designed to assist with software performance analysis. OptView can
be used on both Microsoft Windows and X-Windows.
To generate an optimization report with the Intel 6.0
compilers that can be used by OptView, compile the
source file as usual but include
the flag -opt_report_file filename.
The report will be written to the file filename.
Tip: If you have a lot of source files to process all at once, and
you use a Makefile to compile, you can also use make's "suffix"
rules to have optimization reports produced automatically, each with
a unique name. For example,
The above will create optimization reports that are named identically
to the original Fortran source but with the suffix
".f" replaced by
".opt".
You can then start working with these files using OptView.
OptView is installed on NCSA's Itanium cluster (Titan) in the
directory /usr/apps/tools/bin. You can either
add that directory to your UNIX PATH or you can invoke
optview using an absolute path name. You'll need
to be using the X-Window system and to have set your
DISPLAY environment variable correctly for OptView
to work.
Here's a snapshot of the main window of OptView. An optimization
report has been loaded into
the tool and a portion of the summary information
is shown:
The OptView main window, showing
a portion of the molecular dynamics application NAMD2
(Klaus Schulten/Theoretical Biophysics Group, University of
Illinois).
As you can see, OptView presents optimization information organized
in a manner that's easily understood and navigated. The screen above shows:
An upper frame that lists source files, directory, and loop
summaries from a compilation. This gives a quick overview of
what files were involved and how many opportunities were available
for loop optimization and software pipelining.
A frame in the center that lists reports from functions encountered by
the compiler (either directly in the source file or included from
other locations). Individual loop reports are broken out by function
in this frame, along with a count of the number that were software
pipelined. This gives you a more detailed view that allows you
to easily identify functions that were difficult for the compiler
to handle (in the above example, only one function was encountered
in the selected source file, but it's common for a number of
functions to be maintained together in a single file).
A lower frame in which loop-by-loop information is shown.
The line number (relative to the source file selected in the
upper frame), the function containing that loop, and loop-level
optimization information is displayed.
Additional displays available in OptView
feature color-highlighted browsing of the original source code
as well as pop-up windows that provide in-depth summaries
of the success of individual optimizations (or failure to optimize, which
is probably of more interest to the developer concerned about
optimization).
After you've loaded an optimization report into OptView, you can access the
source code browser for a particular file by double-clicking
on the file name from within the "Source" frame in the
main OptView window.
For example, here's a screen shot of an OptView source code browser
displaying a portion of a program in which
a loop was successfully optimized. The loop control statement
is highlighted
by a light green background (if the compiler
had failed to optimize the loop, the statement would still have been
highlighted, but in red). The color-coding of optimizations
provides very quick insight into the overall success of the
compiler when translating your source code.
An OptView source code browser
window, showing a portion of a kernel from the computational fluid dynamics
application
GenIDLEST (Danesh Tafti, Virginia Tech)
The highlighted regions are also "active hyperlinks" that
enable you to drill down and examine more detailed information about
the optimizations applied to specific loops (or the reasons why
optimization failed). You can request this additional information by
clicking on the highlighted source code line (this feature is not shown
here).
OptView also allows you to browse multiple files in a given directory,
which can help give a quick overall view of which source files
were highly-optimized and which might need additional work.
Here's an example of this feature:
An OptView source directory browser
window, showing a summary of the software pipeline optimizations
in the source of the machine learning program
CN2
(Peter Clark, Univ. of Texas/Boeing Corp.)
This source directory browser window provides easy access to
any of the individual optimization reports by clicking on the
optimization report file name in the leftmost column. This
will automatically load that report in the main OptView window
where you can examine that report further.
OptView and similar tools can be major time-savers that
are invaluable when working
with large applications containing many different source files
(especially if you're not familiar with the application).
By providing a very quick method of isolating which files or
portions thereof are especially difficult for the compiler to
deal with, OptView helps you to quickly focus your attention on those
areas that need it the most.
We're continuing to investigate ways in which performance- and
optimization-related information and measurements
can be made much more easily accessible.
For more information
Those who are interested in the details of software pipelining
in the compiler can refer to the report
Iterative Modulo Scheduling, B. R. Rau, 1995. (H P Labs Technical
Report HPL-94-115)
More general information about the design and features of the
Intel IA-64 compiler can be found in
An Overview of the IA-64 Compiler, Dulong et al, 1999. (Intel
Technology Journal, 4Q 1999). Note: if you have trouble loading this
article, you may want to search for the title directly fromhttp://developer.intel.com/.