Thanks again for your quick response.
FYI, the code most definitely works if Wait(B) is thrown in there. I
think we were more concerned about the "what if's"...
I'm definitely still confused when I read the standard regarding these
semantics then; I had thought Wait(C) implied Wait(B), especially since
they share a tag, communicator/context, and due to the order in which they
are initiated.
As a slight variation of the pseudo-code, say the compute statement on n0
instead read "compute(A+C)", and the rest of the code remained the same
i.e. no additional Wait statements than those in the original. In our
execution, A and C have arrived, but B has not. In this case, does
performing "compute(A+C)" (successfully even) break MPI semantics since
B isn't present yet (and C overtook B)?
Thanks again,
brad
On Thu, 9 Dec 2004, Jeff Squyres wrote:
> Wait(C) does not necessarily imply Wait(B) -- MPI says that you have to wait
> for both before you can read those buffers. It would be concerning if you do
> Wait(C) followed by Wait(B) and still get the wrong results.
>
> Can you try that?
>
>
> On Dec 9, 2004, at 6:55 AM, Brad Penoff wrote:
>
>> Greetings,
>>
>> We have been studying the LAM TCP RPI state machine and in our testing we
>> have uncovered some LAM behavior that we wanted to discuss. Say we have
>> two nodes, one process each. When sending messages from n0 to n1,
>> according to MPI semantics, the messages must be non-overtaking if they
>> have the same tag. In the case of non-blocking, order is defined by the
>> execution order of the initiating calls. Bearing this in mind, say n0 and
>> n1 executed the following pseudocode:
>>
>>
>> size of bufA, B, C, D, E are respectively 200, 800000, 300, 6600, 100
>> ___
>> n0
>> ___
>> from = 1;
>> tag = 0;
>> Irecv(bufA, from, tag)
>> Irecv(bufB, from, tag)
>> Irecv(bufC, from, tag)
>> Irecv(bufD, from, tag)
>> Irecv(bufE, from, tag)
>> Wait(C)
>> compute(C+B)
>> WaitAll()
>>
>> ___
>> n1
>> ___
>> to = 0
>> tag = 0
>> Isend(bufA, to, tag)
>> Isend(bufB, to, tag)
>> Isend(bufC, to, tag)
>> Isend(bufD, to, tag)
>> Isend(bufE, to, tag)
>> compute()
>> WaitAll()
>>
>>
>> ------------------------------------
>>
>> We are seeing cases where the Wait(C) call returns (in n0) where the
>> receive request associated with bufB has not yet been completed. This
>> means our compute(B+C) statement gets messed up. We understand that B
>> must rendezvous, but regardless, MPI semantics don't make special cases
>> for large messages, and we are wondering if it is here...
>>
>> Obviously, we could also have also done a Wait(B), but we had thought that
>> Wait(C) implied Wait(B) due to MPI's nonblocking semantics.
>>
>> Are we seeing anomalous behavior here?
>>
>> Thanks,
>> brad
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>
>
> --
> {+} Jeff Squyres
> {+} jsquyres_at_[hidden]
> {+} http://www.lam-mpi.org/
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
|