Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-04-04 10:27:06

On Apr 4, 2007, at 11:12 AM, pooja_at_[hidden] wrote:

> I want to see how profiling is done .I need to track open mpi _send
> command.
> And so need to see how profiling is done.I dont know how to use
> Can anybody help me???

Generally, you just write an MPI_Send function yourself, like this:


include "mpi.h"
int MPI_Send(void *buf, int count, MPI_Datatype type, int dest,
              int tag, MPI_Comm comm) {
   int ret;
   /* ...gather whatever statistics you want ... */
   ret = PMPI_Send(buf, count, type, dest, tag, comm);
   /* ...gather whatever statistics you want ... */
   return ret;

Then compile my_send.c into your application (either as a standalone
library or as part of the application itself). It'll naturally
intercept all calls to MPI_Send (as long as it is the rightmost
linker unit before -lmpi on the command line -- so, when using the
wrapper compilers, the last linker unit on the right, since "-lmpi"
is added automatically by the wrapper compilers), do your stats
gathering, invoke the back-end PMPI function, etc.

See chapter 8 of the MPI-1 standard for more information:

Jeff Squyres
Cisco Systems