Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] documenting the PMPI profiling interface
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-02-11 17:31:36

On Feb 11, 2010, at 4:13 PM, Eugene Loh wrote:

> In the MPI standard, the portion discussing the PMPI profiling interface says:
> 3. document the implementation of different language
> bindings of the MPI interface if they are layered on top
> of each other, so that the profiler developer knows
> whether she must implement the profile interface for
> each binding, or can economise by implementing it
> only for the lowest level routines.
> Do we have such documentation anywhere? I don't see this in the OMPI FAQ.
> I played with this some. I wrote a Fortran program that called MPI_Send. I wrote a Fortran wrapper that intercepted MPI_Send and called PMPI_Send. I wrote a C wrapper that did the same thing. It appears that both wrappers got called. So, it looks like we should advise users to provide *only* C wrappers (unless they *also* want to intercept at the Fortran level).
> Yes/no?

Yes. Mostly.

I believe there are a small number of exceptions to this... (/me checks...)

Ah yes, here's one: MPI_ERRHANDLER_CREATE() in Fortran does *not* call MPI_Errhandler_create(). Instead, it calls the back-end ompi_errhandler_create() function. There's obscure reasons for this that are pretty uninteresting. To be clear: if you profile this function in both C and Fortran and call it in Fortran, you *won't* see the corresponding C profile function invoked.

I don't know if there's an easy way to generate a full list of functions like this -- it might involve a troll through ompi/mpi/f77/*_f.c to see which ones call MPI_* functions for their back-end functionality vs. which ones don't. I think most call MPI_* functions.

Jeff Squyres
For corporate legal information go to: