LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2006-09-21 08:33:35


The PMPI layer allows you to intercept a call from the user's program.
Specifically, you can write your own MPI_Send() function such that when a
user's MPI application calls MPI_Send, your function is called.

You can do whatever bookkeeping you want, and then invoke the "real" send
function via PMPI_Send(). Something like this:

int MPI_Send(...) {
  int ret;
  save_mpi_send_arguments(...);
  ret = PMPI_Send(...);
  do_some_more_stuff();
  return ret;
}

On 9/19/06 2:43 PM, "Craig Lam" <craig.mpi_at_[hidden]> wrote:

> Interesting idea. You could wrap mpi.h in another header.. say mympi.h and
> inline or #define each mpi send call with a call which took it's instruction
> pointer and prepended it to the message and added the requisite number of
> bytes to the message before actually calling into MPI.
>
> The profiling layer might achieve this for you, I'm not entirely sure if it
> manifests itself as inline code or as actual code in the ELF's .text.
> Anybody know?
>
> Craig
>
>
> On 8/3/06, Oleg Morajko <olegmorajko_at_[hidden]> wrote:
>>
>> Hi there,
>>
>> I am looking for a general solution that would allow for attaching extra
>> informacion to every MPI message sent and access this data after receive. I
>> mean a kind of out-out-bound (or urgent) data as in TCP/IP protocol. The
>> goal is to track sender callpoint address in a receiver process in order to
>> correlate sends and receives down to file/line in source code.
>>
>> The requirement is not to modify a MPI-based application source code, but
>> rather modify MPI implementation (or create a kind-of wrapper for MPI calls)
>> that could do that. It's enough to pass just one integer value (tag field
>> cannot be used for that purpose). I'm using dynamic instrumentation
>> (DynInst) and have the ability to introduce run-time modifications. The
>> ideal solution would be the ability add some extra integer to message
>> envelope (in a reserved field for example) but without recompiling the MPI
>> implementation - so that 2 implementations (instrumented one and normal
>> one) could cooperate without problems.
>>
>> Any ideas how to do that?
>>
>> Regards,
>> --Oleg
>>
>> Aplicaciones en Informatica Avanzada S.A.
>> c./Artesans 10, 08291 Cerdanyola del Valles,
>> Barcelona, Spain
>>
>>
>>
>>
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>
>>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/

-- 
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems