Accessing the profiling libraries
Up: The MPE library of useful extensions Next: Automatic generation of profiling libraries Previous: Real-time animation
If the MPE libraries have been built, it is very easy to access the profiling libraries. The easiest way is the use the mpicc and mpif77 commands. If you are using the makefile templates and mpireconfig instead, then using the profiling libraries is also simple. The sample makefiles contain the makefile variable PROFLIB; by making with different values of this symbol, different profiling effects can be accomplished. In the following examples, we list the libraries that must be added to the list of libraries before the -lmpi library.
- -ltmpi -lpmpi
-
Trace all MPI calls. Each MPI call is preceded by a
line that contains the rank in MPI_COMM_WORLD of the calling process, and
followed by another line indicating that the call has completed. Most send
and receive routines also indicate the values of count, tag, and partner
(destination for sends, source for receives). Output is to standard output.
- -llmpi -lpmpi -lm
-
Generate an upshot-style log file of all MPI calls.
The name of the output file is executablename_profile.log. For
example, if the program is sendrecv, the generated log file is
sendrecv_profile.log.
- -lampi -lmpe -lm -lX11 -lpmpi
- Produce a real-time animation of the program. This requires the MPE graphics, and uses X11 Window System operations. You may need to provide a specific path for the X11 libraries (instead of -lX11).
In Fortran, it is necessary to include the library -lfmpi ahead of the profiling libraries. This allows C routines to be used for implementing the profiling libraries for use by both C and Fortran programs. For example, to generate log files in a Fortran program, the library list is -lfmpi -llmpi -lpmpi -lm.
Up: The MPE library of useful extensions Next: Automatic generation of profiling libraries Previous: Real-time animation