On Sat, Feb 22, 2014 at 7:39 PM, Walter Woods <[email protected]> wrote:
> boost::mpi needs to know exactly the size of data that it's receiving. > So, if you If you're sending / receiving a non-native type, boost::mpi > needs to transmit how big that data is going to be. Then, it sends the > data. So one send becomes two sends to MPI - these are ordered. > > Receiving is the opposite - it uses one receive to get the size, and then > *after > it has the size*, issues another receive to get the data. If you issue > one irecv command before another has gotten its length (and thus issued its > data irecv command internally), then because of message ordering, the first > irecv will get the length, as expected, but then the second irecv will get > the first's data, mistaking it for a length submission. > Aha, I get it now. Thanks for the explanation! Since MPI guarantees isend/irecv is non-overtaking, but boost::mpi does not (for a good reason), perhaps this is worth mentioning in the docs. Roy
_______________________________________________ Boost-mpi mailing list [email protected] http://lists.boost.org/mailman/listinfo.cgi/boost-mpi
