LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Brian Barrett (brbarret_at_[hidden])
Date: 2005-03-13 21:02:45


On Mar 13, 2005, at 8:42 PM, John Korah wrote:

> I am trying to simulate variable latency links on a
> homogenous clusters. Meaning the latency of links
> between certain pairs of computers are larger than
> other links.
>
> Is there any way I can use MPI communication
> primitives to do it? I am using sleep function to do
> it now....

Are you trying to simulate variable latency between MPI applications
using only MPI primitives? LAM doesn't have a built-in feature for
doing this (or doing bandwidth limiting or anything like that).
However, you may be able to do what you want with the profiling layer
and intercept MPI calls. For really simple simulations, sleeps in the
profiling layer should fake latency differences. Since you know
everything the MPI layer knows about the message being sent, you could
do really complex things that I can't even imagine.

For a detailed explanation of the MPI profiling layer, have a look at
the MPI standard. But as a quick example, if you wanted to make
MPI_Send take 1 second longer than usual, you could create an MPI
profiling function like:

int
MPI_Send(void * buf, int count, MPI_Datatype dtd, int rank, int tag,
MPI_Comm comm)
{
   sleep(1);
   return PMPI_Send(buf, count, dtd, rank, tag, comm);
}

Then just compile like normal - your version of MPI_Send will be called
then call PMPI_Send, which is another entry point into LAM/MPI.

Hopefully, you can come up with something more creative than I can :).

Brian

-- 
   Brian Barrett
   LAM/MPI developer and all around nice guy
   Have an LAM/MPI day: http://www.lam-mpi.org/