On Feb 24, 2005, at 9:35 AM, Stephan Mertens wrote:
> Yes, the TCP/IP stack could be responsible for the enhanced fairness.
> I'll check that.
>
> But I am still curious: if a process calls MPI_Recv(...,
> MPI_ANY_SOURCE, ...)
> and there are several messages pending that match this receive, how
> does LAM decide which message to choose? And does this protocol take
> measures to prevent a communication from starvation?
LAM will decide based on some black voodoo magic, including such
information as the last process to sacrifice the proper number of
electrons, the phase of the moon, and where in the world our wonderful
advisor is at the moment.
Ok, maybe not. But it's about as random - we of course make sure we
don't have a matching message in our unexpected message queue, then use
select() and read() to get some new messages. Other than that, it's up
to the MPI application to make sure it avoids starvation (should that
be a problem for a particular application). That's about it.
Hope this helps,
Brian
--
Brian Barrett
LAM/MPI developer and all around nice guy
Have a LAM/MPI day: http://www.lam-mpi.org/
|