This is a great discussion so far.  I'm actually also working on a
similar tool to automate C++ serialization which uses GCCXML as its
first step.  My approach is different in a few ways though:

1. It uses a visual tool.
2. It's intended for the high performance computing (HPC) community.
3. As a result of 2, the serialization is to MPI, not sockets.

We've encountered most of the issues you guys have discussed in the
email, and I think with the visual tool we've solved all of them. The
tool allows the user to select a datatype from their program and then
gives them a treeview of the fields in that datatype.  Then they just
check off what they want to serialize and click generate. The code then gets generated to mirror MPI's normal Send, Recv, etc., calls so that it
looks like you're still using MPI calls but you're actually using the
code generated by the tool.

If you guys are interested, we'll be submitting a paper on the complete tool to ASE 2007 in early June. I can post a link to the paper and the
tool's website when it's all ready.

I missed Wesley's original message, so I'll reply here...

We tackled many issues regarding serialization for MPI in the creation of the Boost.MPI library [1]. Our approach to serialization was to use the Boost Serialization library [2], a C++-only library that can serialize to a variety of different formats. The Boost Serialization library requires users to manually specify a "serialize" function, although we would greatly benefit from a tool that could automatically generate this serialize function from source code.

On the MPI side... Boost.MPI allows one to send/receive any C++ data type, performing (de-)serialization automatically via the Boost Serialization library when necessary. Serialization either maps down to a series of MPI_Pack/MPI_Unpack calls or, when possible, generates derived MPI data types to let the MPI implementation serialize on-the-fly. We had a paper in EuroPVM/MPI last year describing the techniques we use to do this efficiently in C++ [3]; the extended version is under review at the moment, but I'll be happy to send a preprint to anyone interested in this approach to serialization for MPI.

        - Doug


[1] Boost.MPI. http://www.generic-programming.org/~dgregor/boost.mpi/ doc/
[2] Boost.Serialization. http://www.boost.org/libs/serialization/doc/
[3] Prabhanjan Kambadur, Douglas Gregor, Andrew Lumsdaine, and Amey Dharurkar. Modernizing the C++ Interface to MPI. In Proceedings of the 13th European PVM/MPI Users' Group Meeting, LNCS, Bonn, Germany, pages 266--274, September 2006. Springer.
_______________________________________________
gccxml mailing list
[email protected]
http://www.gccxml.org/mailman/listinfo/gccxml

Reply via email to