Next: Plain implementation
Up: The MPI Profiling Interface
Previous: The MPI Profiling Interface
The idea behind the MPI profiling interface (due to James Cownie) is to use
the linker to substitute a user-written ``wrapper'' function for the MPI
function called by the application. In order to do this it must have the same
name. Since we will assume that the author of the profiling library does not
have access to the MPI source code, the profiling version of the MPI function
must have a way to call the real MPI function to actually do the
required task. The problem is that it has the same name as the profiling
version. The way out of this dilemma is to require that every MPI function
also be callable by a different name. The MPI definition requires that every
MPI function MPI_Xxx also be callable by the name PMPI_Xxx.
Then the profiling version of MPI_Bcast, say, called by the
application, can itself call PMPI_Bcast to actually do the broadcast,
performing whatever profiling work is desired before and after the call to
PMPI_Bcast.
We also don't want the author of the profiling library to have to write
profiling versions of every MPI routine. We would like the linker to
use the profiling version of an MPI function if it has been defined, and a
non-profiling version otherwise. There are at least two ways to do this:
plain and fancy.
Next: Plain implementation
Up: The MPI Profiling Interface
Previous: The MPI Profiling Interface
Karen D. Toonen
1998-11-19