Dear All:
I am designing parallel code for MPI with linux.
I am using boost::serialization::access to make the data strucutre to be
transferred from one process to another process, just like transferring
int data type.
I got the errors as follows:
--------------------------------------------------------------------
/lustre/boost_2010_6_8/boost_1_43_0/boost/config/stdlib/libstdcpp3.hpp:40:1: warning: "BOOST_HAS_THREADS" redefined
<command line>:1:1: warning: this is the location of the previous definition
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp: In static member function âstatic void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = population]â:
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:74: instantiated from âvoid boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = population]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:133: instantiated from âvoid boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = population]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/archive/detail/iserializer.hpp:182: instantiated from âvoid boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::mpi::packed_iarchive, T = population]â
myNetplanScheduler.cpp:445: instantiated from here
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp:118: error: âstruct populationâ has no member named âserializeâ
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp: In static member function âstatic void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_oarchive, T = population]â:
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:74: instantiated from âvoid boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_oarchive, T = population]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:133: instantiated from âvoid boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_oarchive, T = population]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/archive/detail/oserializer.hpp:148: instantiated from âvoid boost::archive::detail::oserializer<Archive, T>::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::mpi::packed_oarchive, T = population]â
myNetplanScheduler.cpp:445: instantiated from here
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp:118: error: âstruct populationâ has no member named âserializeâ
make: *** [myNetplanScheduler.o] Error 1
-------------------------------------------------------------------------
If I add the following to the class population
=-------------------------------------------------
typedef struct {
individual *ind;
protected:
// provide serialization of this class, for MPI send/recv
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive& ar, const unsigned int version)
{
ar & ind;
};
}
population;
------------------------------------------------
I got more errors:
-----------------------------------------------
/lustre/boost_2010_6_8/boost_1_43_0/boost/config/stdlib/libstdcpp3.hpp:40:1: warning: "BOOST_HAS_THREADS" redefined
<command line>:1:1: warning: this is the location of the previous definition
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp: In static member function âstatic void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = int*]â:
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:74: instantiated from âvoid boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = int*]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:133: instantiated from âvoid boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = int*]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/archive/detail/iserializer.hpp:182: instantiated from âvoid boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::mpi::packed_iarchive, T = int*]â
myNetplanScheduler.cpp:448: instantiated from here
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp:118: error: request for member âserializeâ in âtâ, which is of non-class type âint*â
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp: In static member function âstatic void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = double]â:
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:74: instantiated from âvoid boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = double]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/serialization.hpp:133: instantiated from âvoid boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::mpi::packed_iarchive, T = double]â
/lustre/boost_2010_6_8/boost_1_43_0/boost/archive/detail/iserializer.hpp:182: instantiated from âvoid boost::archive::detail::iserializer<Archive, T>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const [with Archive = boost::mpi::packed_iarchive, T = double]â
myNetplanScheduler.cpp:448: instantiated from here
/lustre/boost_2010_6_8/boost_1_43_0/boost/serialization/access.hpp:118: error: request for member âserializeâ in âtâ, which is of non-class type âdoubleâ
..................
---------------------------------------------
Any help is appreciated.
Jack
Aug. 14 2010