Boost logo

Boost Users :

Subject: Re: [Boost-users] mpi/serialization: broadcasting derived class through base pointer
From: MM (finjulhich_at_[hidden])
Date: 2012-01-20 07:47:11


> -----Original Message-----
> From: Matthias Troyer [mailto:troyer_at_[hidden]]
> Sent: 16 December 2010 15:20
> To:
> Subject: Re: [Boost-users] mpi/serialization: broadcast function and
> the value argument
>
>
> On Dec 16, 2010, at 10:54 PM, Hicham Mouline wrote:
>
> > 1.44
> > As I wrote, I am able to debug deep into boost mpi and archive.
> > Please let me know if I should send any more stacks or other data,
> >
>
> Please try with 1.45. Pointer serialization in Boost.MPI has been
> broken in 1.44 due to changes in Boost.Serialization.
>
> Matthias

Hello Matthias, Robert Ramey,
I am revisiting the topic of mpi broadcast-receiving a polymorphic object
through a base class null pointer:

void recv_histodata(boost::mpi::communicator& world)
{
  historical_data_base* hd = nullptr;
  boost::mpi::broadcast(world, hd, master_process);
}
historical_data_base has 3 derived classes.

I get the unregistered class exception from the serialization library, and
so I am trying to register the derived type as shown in the serialization
doc at /libs/serialization/doc/index.html : reference

ar.template register_type<derived_one>();

but where do I put that?

Regards,

MM


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