Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.MPI] question about serializingcustomobject
From: Matthias Troyer (troyer_at_[hidden])
Date: 2010-08-28 15:09:54


On 28 Aug 2010, at 16:15, Jeff Flinn wrote:

> Matthias Troyer wrote:
>>>
>>>
>> What happens is that when using the skeleton&contents mechanism the serialized data is split into two parts: all the "structural" data (the skeleton), such as version, object id, class name .... is serialized into a buffer as the skeleton, and all the "normal" data members are used to create an MPI data type. You might argue that this second one actually turns racking off.
>> The nicest thing, however, is that these two "archives" are both created only once. The MPI datatype created for the contents is then used many times, and all of work there is done by MPI and the network hardware without needed the serialization library anymore.
>
> So what happens if the some data member that is a base class pointer gets modified to point to some other instance of a derived class? Doesn't that change the 'structure'?

Indeed pointers are not part of the "content" and if you change the structure you need to send the complete object, or first update it by sending the new skeleton. This is however a rare occurence in the typical MPI program.

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