Boost logo

Boost Users :

Subject: Re: [Boost-users] Hybrid parallelism, no more + mpi+serialization, many questions
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-11-16 19:04:38


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Riccardo Murri
> Sent: 16 November 2010 21:08
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Hybrid parallelism, no more +
> mpi+serialization, many questions
>
> On Tue, Nov 16, 2010 at 9:52 PM, Hicham Mouline <hicham_at_[hidden]>
> wrote:
> > MPI uses serialization to serialize user-defined types (you write the
> > serialize template function).
> > I don't know if MPI lets you choose if you want a binary archive or a
> > text/xml archive.
>
> Boost.MPI chooses the archive: its own specialized archive version.
>
> In general, with Boost.Serialization, the serialization functions you
> write are independent of the archive: they work equally well with a
> text/xml archive than with a binary archive. Boost.MPI exploits this
> and defines its own archive types to translate your classes into
> something that (C level) MPI can handle.
>
> You can influence the process to gain some more speed with types
> that directly map to MPI types, see the Boost.MPI manual:
>
> http://www.boost.org/doc/libs/1_44_0/doc/html/mpi/tutorial.html#mpi.per
> formance_optimizations
>
>
> Best regards,
> Riccardo
> --
Therefore endianness and bitness is not an issue even for primitive types inside complex user-defined types,

For e.g.

struct my_type {
  double d1;
  int d2;
};

then I write the templated serialize() function for my_type.

MPI should be able to send(after serialization) an instance of my_type from Intel to a Sparc box where the instance is deserialized and the object will be properly constructed (d1 will be correct)

cool,


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