feat(smp): add SerializableBase for MPI population transfer#85
feat(smp): add SerializableBase for MPI population transfer#85evvaletov wants to merge 1 commit intonojhan:masterfrom
Conversation
3af4b13 to
2bb2158
Compare
|
Seems like a good idea. I don't recall the specifics (I worked on that a... long time ago), but why do we have a JSON serialization, apart from the regular one (the one using printOn & readFrom)? The regular one also seems more compact. And why not using a digital serialization instead of text-based one (which would be faster)? |
Template wrapper making any type T serializable via eoserial::Persistent, required for transferring populations between MPI ranks in the island model.
2bb2158 to
6d4909c
Compare
|
Rebased onto HEAD. On the serialization choice: On binary vs text: fair point. The |
|
I see, I forgot about the recursive part, that's a killer feature. This seems good to me. Ask for review when you're ready. |
Summary
Adds
SerializableBase<T>, a template wrapper that makes any typeTserializable via ParadisEO's
eoserial::Persistentinterface.Motivation
The MPI island model (#86) needs to transfer
eoPop<EOT>between MPIranks. ParadisEO's serialization framework (
eoserial) providespack()/unpack()for converting objects to/from a JSON-like intermediaterepresentation, but
eoPopdoesn't directly implementeoserial::Persistent.SerializableBasebridges this gap — it wraps anyTthat haseoserialsupport and exposes thePersistentinterface foruse with
eo::mpi's send/recv.Changes
smp/src/SerializableBase.hsmp/src/SerializableBase.tppsmp/src/smp.h#include <SerializableBase.h>