The problem here is that an MPI_Datatype
object such as PEDGE
is not itself the new datatype, merely an opaque handle to some implementation-specific entity that MPI can interpret as a datatype. As such, sizeof()
will not be able to return its accurate size. Use MPI_Type_size()
instead.
As for the sends failing, I can't say much without seeing your code, but your datatype definition does look correct.