
96 Cray T3E User’s Guide
when the program is executed. The files are passed to the Apprentice
tool for graphical examination.
MPP Apprentice is used by the following steps. Fortran 90 programs
are compiled with the option -eA and object codes linked with the MPP
Apprentice library using the option -lapp:
t3e% f90 -c -eA prog.f
t3e% f90 -o prog.x prog.o -lapp
The compiler option -eA and the linker option -lapp work also with the
PGHPF High Performance Fortran compiler. ANSI C and C++ programs
are compiled with -happrentice option and object codes linked with
the MPP Apprentice library libapp.a:
t3e% cc -c -happrentice prog.c
t3e% cc -o prog.x prog.o -lapp
The corresponding commands for C++ are:
t3e% CC -c -happrentice prog.c
t3e% CC -o prog.x prog.o -lapp
The next step is to run the parallel program. Be aware that the exe-
cution time of the instrumented code can now be considerably longer
than without the MPP Apprentice hooks. After the execution you will
have a run-time information file (RIF) called app.rif in your directory.
After the program has been run start the MPP Apprentice tool with the
command apprentice.
t3e% mpprun -n 4 ./prog.x
t3e% apprentice app.rif &
An example session with Apprentice is show in Figure 9.3. The top pane
shows execution time for each subroutine. You can exclude or include
the time spent in called subroutines with the buttons on top of the pane.
You can click on the triangles to the right of the subroutine names to
show or hide internal information about called subroutines.
The lower pane shows the number of instructions for a subroutine or a
loop that has been selected in the upper pane. In some cases you can
also get information on the shared memory usage or message passing
usage for the selected routine.
The Apprentice tool can also provide textual reports on the performance
of the code. Choose either Observations or Reports from the Displays
menu to get the reports for the currently selected subroutine.
More information on the Apprentice tool can be obtained with the com-
mand man apprentice, from the help system of the Apprentice tool
itself or from the manual Introducing the MPP Apprentice Tool [Craf],
available online at the WWW address http://www.csc.fi:8080.
Commentaires sur ces manuels