On Apr 4, 2007, at 11:12 AM, po...@cc.gatech.edu 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
PMPI_SEND.
Can anybody help me???
Generally, you just write an MPI_Send function yourself, like this:
my_send.c:
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:
http://www.mpi-forum.org/docs/mpi-11-html/node152.html#Node152
--
Jeff Squyres
Cisco Systems