You might want to investigate using the MPI profiling layer. This
allows you to "override" the MPI_Send function (for example) -- you can
add your own counters and then call the "real" MPI_SEND function.
Something like this:
-----
static int num_sends = 0;
int MPI_Send(...) {
++num_sends;
return PMPI_Send(...);
}
-----
Then link this function in before libmpi. For example, make libmympi.a
and link your MPI application as follows:
-----
mpicc my_app.o -L/path/to/libmympi -lmympi
-----
This will call your MPI_Send function (instead of LAM's), which will
count the number of times it was called and then call LAM's PMPI_Send
(which is identical to MPI_Send).
Check out the profiling chapter in the MPI-1 standard; it describes
this concept in more detail than I did here.
On Nov 1, 2004, at 11:13 PM, Rober AJ wrote:
> Hi everybody,
>
> I would like to know if there is a way to get on the
> flight the number of messages being sent and received
> by a MPI process.
> I 've tried using mpitask, and mpimsg, but they can´t
> help me for this purpose.
> In the other hand I haven't found a way to read
> def.lamtr generated by lamtrace.
>
> I would appreciate any ideas or comments.
>
> _________________________________________________________
> Do You Yahoo!?
> Información de Estados Unidos y América Latina, en Yahoo! Noticias.
> Visítanos en http://noticias.espanol.yahoo.com
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|