All notes

Send an object via MPI using serialization

Send an object via MPI using serialization.

There are three main ways to send an object with MPI:

  • Serialize the object into a byte string and send that. This involves converting the object into a binary format that can be reconstructed elsewhere.
  • Send each attribute of the object separately and reassemble it at the receiving end.
  • Register the object as an MPI data type. This defines how the object should be laid out in memory so MPI knows how to send its constituent parts.

Serialization

With Boost.Serialization, you convert the object into a byte stream, send it with MPI_Send, and receive it with MPI_Recv. The receiving process deserializes the stream to reconstruct the object.

(In progress)

The example is still to be written: serialize an object, send it, then deserialize it on the receiving process.

Resources

Read as Markdown

Written by Kenneth Assogba. Email me