>By serialization, I mean in the context of data storage and transmission. See http://en.wikipedia.org/wiki/Serialization
>e.g. in a structure or class, if there is a pointer pointing to some memory outside the structure or class, one has to send the content of the memory besides the structure or class, right?
Okay, yes. There are also MPI_Pack/MPI_Unpack functions that take
general data types and pack them into contiguous (serialized) buffers.
But you first have to describe to MPI what those data structures look
like. And it can certainly get complicated.
I think I don't have much else to contribute here. There are lots of
options and decisions to make based on the particulars of your data
structures. The general problem can certainly be complicated, as you've
already indicated. Good luck.