📄 node18.htm
字号:
<HTML>
<HEAD>
<!-- This file was generated by tohtml from mpichntman.tex -->
<!-- with the command
tohtml -default -dosnl -gaudy -basedef mpiman.def mpichntman.tex
-->
<TITLE>Log and tracefile tools</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<HR><H2><A NAME="Node18">Log and tracefile tools</a></H2>
<A HREF="node13.htm#Node17"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node8.htm#Node8"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node18.htm#Node19"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node8.htm#Node8"> Programming Tips</a>
<b>Next: </b><A HREF="node18.htm#Node19"> Logging C applications</a>
<b>Previous: </b><A HREF="node13.htm#Node17"> Attaching a debugger to a running program</a>
<P>
The Windows distribution of <TT>mpich</TT> comes with the MPE library for profiling applications
and the Jumpshot java tool for visualizing the generated log files.
<P>
<menu>
</menu>
<P>
<HR>
<A HREF="node13.htm#Node17"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node8.htm#Node8"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node18.htm#Node19"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node8.htm#Node8"> Programming Tips</a>
<b>Next: </b><A HREF="node18.htm#Node19"> Logging C applications</a>
<b>Previous: </b><A HREF="node13.htm#Node17"> Attaching a debugger to a running program</a>
<P>
<HR><H3><A NAME="Node19">Logging C applications</a></H3>
<A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node18.htm#Node20"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<b>Next: </b><A HREF="node18.htm#Node20"> Logging Fortran applications</a>
<b>Previous: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<P>
The MPE library is used for logging information
about the execution of each MPI call to a log file for later analysis.
This library may be accessed when linking the program.
For example, to create a log file of a program such as <tt>cpi</tt>, all that needs
to be done is to insert the mpe library in the link statement before the mpich library:
<em>mpe.lib mpich.lib</em>
<P>
The log file will be written to a file with the name <em>cpi.exe.clog</em>
or <em>cpi.exe.slog</em>, depending on the value of the environment variable
<tt>MPE_LOG_FORMAT</tt> (clog is the default). A clog file can be converted
to the slog format using the <em>clog2slog.exe</em> tool found in the
<tt> MPICH<IMG WIDTH=5 HEIGHT=11 SRC="img35.xbm">
SDK<IMG WIDTH=5 HEIGHT=11 SRC="img36.xbm">
profiling</tt> directory. Only small slog files
can be created directly. If the log file is going to be large, you must create
a clog file and then convert it to an slog file. SLOG files can be
graphically displayed using the Jumpshot program, described in
Section <a href="node18.htm#Node21">Jumpshot
</a>.
<P>
Here is an example:
<ol>
1. Build cpi from the examples<IMG WIDTH=5 HEIGHT=11 SRC="img37.xbm">
nt directory selecting the PDebug target.
This project has <em>mped.lib mpichd.lib</em> in the link command.
<BR>
2. mpirun -np 4 cpi.exe
<BR>
3. clog2slog cpi.exe.clog
<BR>
4. java -jar jumpshot3.jar
<BR>
5. File=<I>></I>Select Logfile, choose cpi.exe.slog
</ol>
<P>
<HR>
<A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node18.htm#Node20"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<b>Next: </b><A HREF="node18.htm#Node20"> Logging Fortran applications</a>
<b>Previous: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<P>
<HR><H3><A NAME="Node20">Logging Fortran applications</a></H3>
<A HREF="node18.htm#Node19"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node18.htm#Node21"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<b>Next: </b><A HREF="node18.htm#Node21"> Jumpshot</a>
<b>Previous: </b><A HREF="node18.htm#Node19"> Logging C applications</a>
<P>
The Fortran interface in the mpich dlls cannot be profiled. In order to profile a Fortran
application, the application must be re-linked with the static mpich libraries. The static libraries
can be built from the source distribution <em>mpich.nt.1.2.5.src.exe</em> using the <em>mpich.static.dsw</em> workspace
in the mpich root directory, or downloaded from <tt>ftp.mcs.anl.gov</tt> in directory
<em>pub/mpi/nt/binaries</em>. The debug static libraries are:
<em>mpichsd.lib</em>, <em>pmpichsd.lib</em> and <em>mpichfsd.lib</em>.
The release static libraries are: <em>mpichs.lib</em>, <em>pmpichs.lib</em> and <em>mpichfs.lib</em>.
You also need the <em>mpdutil.lib</em> and <em>crypt.lib</em> libraries from the mpd workspace that
can be built or downloaded.
<P>
For debug targets, add <em>mpichfsd.lib mped.lib mpichsd.lib pmpichsd.lib mpdutil.lib crypt.lib</em>
to the link command.
<P>
For release targets, add <em>mpichfs.lib mpe.lib mpichs.lib pmpichs.lib mpdutil.lib crypt.lib</em>
to the link command.
<P>
After building with the static libraries, run the application and view the log file using the
steps described in the previous section.
<P>
<P>
<HR>
<A HREF="node18.htm#Node19"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node18.htm#Node21"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<b>Next: </b><A HREF="node18.htm#Node21"> Jumpshot</a>
<b>Previous: </b><A HREF="node18.htm#Node19"> Logging C applications</a>
<P>
<HR><H3><A NAME="Node21">Jumpshot</a></H3>
<A HREF="node18.htm#Node20"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node22.htm#Node22"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<b>Next: </b><A HREF="node22.htm#Node22"> Performance measurements</a>
<b>Previous: </b><A HREF="node18.htm#Node20"> Logging Fortran applications</a>
<P>
<P>
Jumpshot is a program for displaying logfiles produced using the MPE
logging library. Jumpshot is described in more detail in the
<em> MPE Installation and User's manual</em> [<a href="node66.htm#-Bib2">2</a>]. Jumpshot
is a Java program and requires a functioning Java environment.
You can view an slog logfile such as <em>cpi.exe.slog</em> in the example above by using
<em>jumpshot3.jar</em> found in the <tt> MPICH<IMG WIDTH=5 HEIGHT=11 SRC="img38.xbm">
Jumpshot</tt> directory.
Shortcuts to the Jumpshot manual and jumpshot3.jar are found at:
start-<I>></I>programs-<I>></I>MPICH-<I>></I>Jumpshot
<P>
<P>
<HR>
<A HREF="node18.htm#Node20"><IMG WIDTH=16 HEIGHT=16 SRC="previous.xbm"></A><A HREF="node18.htm#Node18"><IMG WIDTH=16 HEIGHT=16 SRC="up.xbm"></A><A HREF="node22.htm#Node22"><IMG WIDTH=16 HEIGHT=16 SRC="next.xbm"></A><BR>
<b>Up: </b><A HREF="node18.htm#Node18"> Log and tracefile tools</a>
<b>Next: </b><A HREF="node22.htm#Node22"> Performance measurements</a>
<b>Previous: </b><A HREF="node18.htm#Node20"> Logging Fortran applications</a>
<P>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -