-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Riccardo Murri Sent: 16 November 2010 21:08 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Hybrid parallelism, no more + mpi+serialization, many questions
On Tue, Nov 16, 2010 at 9:52 PM, Hicham Mouline
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,