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 11:03:53


On Apr 4, 2007, at 10:36 AM, Durga Choudhury wrote:

> Even simpler, you could just write a macro wrapper around MPI_Send
> (as opposed to C code). However, if your calls are happening inside
> a precompiled library (and you don't have source code for it or
> don't want to recompile it) then this won't work and you'd want a
> real profiler. However, I don't think you should be tracking PMPI_*
> calls anyway; those are implementatiopn details and not user
> exposed APIs. Am I right, Jeff?

PMPI_Foo is what you are supposed to call inside the profiled MPI_Foo
function.

The intent of the PMPI interface is that it always exists and will
represent the "real"/back-end functionality. So you can provide your
own MPI_Foo function that turns around and calls the "real" PMPI_Foo
function.

> Durga
>
>
> On 4/4/07, Jeff Squyres <jsquyres_at_[hidden]> wrote: 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
> > 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
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
>
> --
> Its a battle between humans and communists;
> Which side are you in?
> .
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Jeff Squyres
Cisco Systems