From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Matthias Troyer Sent: 29 January 2012 12:32 To: boost-users@lists.boost.org Subject: Re: [Boost-users] mpi/serialization: broadcasting derivedclass
through base pointer
this is not an infinite loop since it calls operator>> with a different
type - can you please post more if you think there is an infinite >loop. I am still confused as to what the reason for your problems is.
Also, did you test whether what you want to do works if you use binary
archives, to store and load the object?
Matthias
This was happening at a stage where I was not consistent in the sending broadcast with the receiving broadcast. Just to double check, I assume that it should be possible to: 1. send with mpi::broadcast( , const base_pointer, ) and receive with mpi::broadcast( , const base_pointer, ), granted the derived classes have been exported with BOOST_CLASS_EXPORT_KEY in both translation units. 2. send with mpi::broadcast( , const derived_pointer, ) and receive with mpi::broadcast( , const base_pointer, ), granted the derived classes have been exported with BOOST_CLASS_EXPORT_KEY in both translation units. I am doing 1. and 2.. In both cases the receiver throws "class unregistered" even though the BOOST_CLASS_EXPORT_KEY expands correctly in both sender and receiver(slave) translation units. What was the fix you were comitting over the weekend? thanks MM