Next: , Previous: SHMEM Measurement API, Up: API Reference


A.3 MPI Measurement API

The prototypes for the MPI measurement API are shown below:

     #include <pmpi.h>
     
     int pmpi_control(int on);
     
     unsigned int pmpi_create_event(const char *name, const char *desc);
     
     void pmpi_event_start(unsigned int evttag, ...);
     void pmpi_event_end(unsigned int evttag, ...);
     void pmpi_event_atomic(unsigned int evttag, ...);

A.3.1 MPI API Description

These functions may be used to turn data measurement on and off at runtime, and to manually instrument your program to notify PPW about application-specific events, such as when your program enters certain phases of communication or computation.

If you plan on using your code with systems that might not support these functions, such as non-GASP compilers, you may protect each part of your program that is related to these functions by checking for the existence of the __GASP_PMPI__ macro. Any C compiler or performance tool supporting the measurement API described here will define the __GASP_PMPI__ macro, so protecting any manual instrumentation with #ifdefs will allow your code to remain portable to systems not supporting this API.

A.3.2 MPI API Notes

These functions are analogous to the pupc_create_event(3) functions and are subject to the same notes and limitations. See the pupc_create_event(3) for more documentation on how to properly use these functions.

For more information on pupc_create_event, see See UPC Measurement API.