Hi Matthias,
yes //and so on does further serializations. Here is the code, there a
some redundancies for later design decisions:
void Ball<Float>::serialize( Archive & ar, const unsigned int version )
{
ar & BOOST_SERIALIZATION_NVP( membership ); //vector<bool>
ar & BOOST_SERIALIZATION_NVP( members ); //vector<int>
ar & BOOST_SERIALIZATION_NVP( r ); //int
ar & BOOST_SERIALIZATION_NVP( is_infinity ); //bool
ar & BOOST_SERIALIZATION_NVP( up_to_date ); //bool
ar & BOOST_SERIALIZATION_NVP( *QR ); //own type, see below
//if( !up_to_date )
//update();
for( int i=0; i 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 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