Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.MPI] question about serializingcustomobject
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-08-28 10:15:12


Matthias Troyer wrote:
> On 27 Aug 2010, at 23:53, Robert Ramey wrote:
>
>> Matthias Troyer wrote:
>>> On 27 Aug 2010, at 22:26, Robert Ramey wrote:
>>>> hmm - what about tracked objects? I suggested turning off tracking
>>>> and Matthias told me that it was needed to send pointers. But for
>>>> this to work an archive has to be reconstructed everytime to
>>>> re-initialize the tracking lists. I don't want to spend a lot of
>>>> time on this as that means I have to delve into the MPI
>>>> serialization and I don't want
>>>> to do this.
>>> The typical use case is that the pointer structure is built once, and
>>> then only the values of arrays and other data members needs to be
>>> updated by communication. The "skeleton" creates all the objects and
>>> sets the pointers, and is sent only once, and thereafter only the
>>> "contents" is transmitted.
>> So tracking is effectively turned off by this archive implemenation.
>> Which makes sense to me from a practical standpoint. But
>> it does make things harder to understand. To be fair, the
>> other archive classes each have their own implemention
>> quirks which are more or less ad hoc. Hopefully one
>> day we can rationalize this to some extent.
>
>
> 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'?

Jeff


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