Boost logo

Boost Users :

Subject: Re: [Boost-users] Segfault when trying to deserialize std::lists in a multi_array
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2011-07-25 19:16:00


>> I'm trying to send a 3D boost::multi_array containing std::list of
>> pointers to particle structs via boost::mpi and keep getting a segfault
>> on receive.

> Sorry, I accidentaly edited that part out when posting. The whole struct look
> like this:
>
> struct Particle {
>     EIGEN_MAKE_ALIGNED_OPERATOR_NEW
>     V3D    r, u;
>     double m, q, igamma;
>     double qm;  // = q/m
>     unsigned number;
>
>     friend class boost::serialization::access;
>     template<class Archive>
>     void serialize(Archive & ar, const unsigned int file_version) {
>         ar & r;
>         ar & u;
>         ar & m;
>         ar & q;
>         ar & igamma;
>         ar & qm;
>         ar & number;
>     }
> };

Again, I doubt it is the culprit, but have you tried using
&r.x(), &r.y(), &r.z() within your serialize method instead of
expecting ar to "know" about Eigen types?

- Rhys


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