Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Problem implementing a line-based protocol
From: Hannes Brandstätter-Müller (boost_at_[hidden])
Date: 2011-01-18 04:32:09


I posted about a week ago that I had some problems with asio and sending and
receiving a line-based message protocol.

I rewrote some parts of the code to clean it up and to see if there were any
more errors hidden in the code duplications that were in there.

I now don't get the truncated message mentioned before, but now it seems
that some lines are lost completely.

Setup:
* Self-written server using boost::asio::read_until with '\n' as the
delimiter. Works flawlessly even if there are multiple lines in the input...
* Self-written client using async_write and a loop of io_service.run_one()
and checking the resulting ec to enable timeouts.

When the client uses normal GCC to compile, it works flawlessly, at least in
my tests. But when I use MPI, especially the calls to MPI::Init() and
MPI::Finalize() and comppile with mpic++ wrapper, some messages do not
arrive at the server. The server is unchanged. The not-arriving messages use
boost serialization for some data, but one message that uses it does get
through. I have tried with openmpi and mpich2.

I am now seriously out of ideas what else to try.

Hannes



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