Boost logo

Boost-MPI :

Subject: Re: [Boost-mpi] multiple irecv tests failure with MPI_ERR_TRUNCATE
From: Roy Hashimoto (roy.hashimoto_at_[hidden])
Date: 2014-02-23 15:13:47


On Sat, Feb 22, 2014 at 7:39 PM, Walter Woods <woodswalben_at_[hidden]> 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-Commit list run by troyer at boostpro.com