|
Boost Users : |
Subject: Re: [Boost-users] [mpi] irecv / send problem
From: tom fogal (tfogal_at_[hidden])
Date: 2009-07-01 23:09:42
Nick Collier <nick.collier_at_[hidden]> writes:
> I running into an issue where an irecv followed by a send results in
> deadlock. A simple test case,
[snip]
> int other = world.rank() == 0 ? 1 : 0;
> cout << world.rank() << " irecv from " << other << endl;
> receipt.request = world.irecv(other, 0, receipt.items);
> cout << world.rank() << " sending to " << other << endl;
> world.send(other, 0, msg);
[snip]
Does this even work with non-boost MPI? My reading (skimming) of the
MPI spec does not generate the implication that synchronous sends can
be asynchronously received.
See:
http://www.mpi-forum.org/docs/mpi21-report/node58.htm#Node58
Note the emphasized part in:
The fields in a status object returned by a call to
MPI_WAIT, MPI_TEST, or any of the other derived functions *(
MPI_{TEST|WAIT}{ALL|SOME|ANY}), where the request corresponds to
a send call, are undefined, with two exceptions: The error status
field will contain valid information if the wait or test call
returned with MPI_ERR_IN_STATUS; and the returned status can be
queried by the call MPI_TEST_CANCELLED.*
_Wait and _Test not working *does* imply, to me, that synchronous and
asynchronous communication may not be mixed for the same communication.
-tom
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net