Boost logo

Boost Users :

Subject: Re: [Boost-users] [mpi] irecv / send problem
From: Matthias Troyer (troyer_at_[hidden])
Date: 2009-08-06 16:54:50


Hi Nick,

can you please file a ticket with your example code so that we do not
forget about this? I understand the issue but the fix will not be easy.

Matthias

On 12 Jun 2009, at 13:16, Nick Collier wrote:

> I running into an issue where an irecv followed by a send results in
> deadlock. A simple test case,
>
> class Item {
> private:
>
> friend class boost::serialization::access;
>
> template<class Archive>
> void serialize(Archive& ar, const unsigned int version) {
> ar & val;
> }
>
> public:
> int val;
> Item() : val(1) {
> }
>
> };
>
> struct Receipt {
>
> boost::mpi::request request;
> std::vector<Item> items;
> };
>
> int main(int argc, char **argv) {
>
> mpi::environment env(argc, argv);
> mpi::communicator world;
> Receipt receipt;
>
> vector<Item> msg(100000);
>
> 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);
>
> receipt.request.wait();
>
> cout << "Done" << endl;
> }
>
> Run with mpirun -np 2, this never completes. It does complete with
> vector<Item> msg(10) however.
>
> Nick
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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