Boost logo

Boost Users :

Subject: Re: [Boost-users] mpi/serialization: string serialization and constchar*
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-01-02 12:12:08


Hicham Mouline wrote:
> hello,
>
> Including
> I mpi::broadcast an object. Its serialization method is split into a
> save() and a load(). In the save(), I send:
>
> ar << "fixed_params";
>
> where ar is a boost::mpi::packed_iarchive.
>
> At reception, the load() function :
>
> std::string paramstype;
> ar >> paramstype;
> if (paramstype=="fixed_params") /// this fails because the count
> of characters if 12 for 1 side and 13 for the other. The null
> character is there.
>
> Should this work?

no.

The type loaded has to be identical to the type saved.

Robert Ramey

>
> regards,
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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