Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPI, serialization] Segmentation fault in heterogeneous cluster
From: Matthias Troyer (troyer_at_[hidden])
Date: 2010-09-17 04:14:14


On Sep 16, 2010, at 1:21 PM, Martin Hünniger wrote:

> Hello,
>
> I have a similar problem here. I try to send data from one process to another (mpirun -np 2). The dataI use is serialized in the appropriate way. If I send it to a text archive I can it restore again from this text archive and all is ok. But when I try to send the data between the processes something goes wrong and the data is not restored correctly.
>
> I have the following serialization routine:
>
> template<typename Float>
> template<class Archive>
> void Ball<Float>::serialize( Archive &ar, const unsigned int version )
> {
> ar & BOOST_SERIALIZATION_NVP( members ) // std::vector<int> members
> // and so on...
>
> // Testing:
> for( int i=0; i<members.size(); ++i )
> std::cout << members[i] << " ";
> std::cout << std::endl;
> }
>
> the output on sending such an object is (for example)
> 0 1 3 2
>
> the output on receiving the same object is
> 0 0 0 0
>
> So there seems to be something wrong during storing the data in ar or during the restoration process.
>
> Did someone in this thread come already to a solution to this problem?
>
> Cheers,
> Martin

I'll take a look this weekend. I assume the "// and so on.." does not do any further serialization?

Matthias


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