Is it possible to pass a struct in MPI.jl?

Serialization lets you write arbitrary data to a buffer, see Serialization · The Julia Language

The lowercase MPI.send will serialize the data then call MPI.Send (MPI.isend is the non-blocking version of MPI.send); MPI.recv will probe the message to find out how long it is, allocate an appropriate buffer, call MPI.Recv, then deserialize the buffer and return the object.

These are naturally slower as the copy data and are not type stable, there are some benchmarks in the MPI.jl paper