The MPE Extension Library


Up: Toward a Portable Parallel Programming Environment Next: Command-Line Arguments and Standard I/O Previous: Toward a Portable Parallel Programming Environment

MPE (Multi-Processing Environment) is a loosely structured library of routines designed to be ``handy'' for the parallel programmer in an MPI environment. That is, most of the MPE functions assume the presence of some implementation of MPI, but not necessarily of MPICH. MPE routines fall into several categories.

Parallel X graphics
There are routines to provide all processes with access to a shared X display. These routines are easier to use than the corresponding native Xlib routines and make it quite convenient to provide graphical output for parallel programs. Routines are provided to set up the display (probably the hardest part) and draw text, rectangles, circles, lines, etc. on it. It is not the case that the various processes communicate with one process that draws on the display; rather, the display is shared by all the processes. This library is described in [23].
Logging
One of the most common tools for analyzing parallel program performance is a time-stamped event trace file. The MPE library provides simple calls to produce such a file. It uses MPI calls to obtain the time-stamps and to merge separate log files together at the end of a job. It also automatically handles the misalignment and drift of clocks on multiple processors, if the system does not provide a synchronized clock. The logfile format is that of upshot [33]. This is the library for a user who wishes to define his own events and program states. Automatic generation of events by MPI routines is described in Section Profiling Libraries .
Sequential Sections
Sometimes, a section of code that is executed on a set of processes must be executed by only one process at a time, in rank order. The MPE library provides functions to ensure that this type of execution occurs.
Error Handling
The MPI specification provides a mechanism whereby a user can control how the implementation responds to run-time errors, including the ability to install one's own error handler. One error handler that we found convenient for developing MPICH starts the dbx debugger in a popup xterm when an error is encountered. Thus, the user can examine the stack trace and values of program variables at the time of the error. To obtain this behavior, the user must
    1. Compile and link with the -g option, as usual when using dbx.
    2.
      1. Link with the MPE library.
      Call
      MPI_Errhandler_set( comm, MPE_Errors_call_dbx_in_xterm ) 
          
      early in the program,

      OR


      2. Pass the -mpedbg argument to mpirun (if MPICH configured with -mpedbg).




Up: Toward a Portable Parallel Programming Environment Next: Command-Line Arguments and Standard I/O Previous: Toward a Portable Parallel Programming Environment