Packed data needs to be sent with a ``packed data'' bit; this means that datatypes need to know whether any part of the datatype is MPI_PACKED. The only other option is to always use the same format, for example, network byte order, at the cost of maximum performance.
Many systems can be handled by using byte swapping; with data extension (e.g., 32-bit to and from 64-bit integers), most systems can be handled. In some cases, only floating point requires special treatment; in these cases, XDR may be used where IEEE format is not guaranteed.
The MPI specification provides MPI_PACK and MPI_UNPACK functions; unfortunately, these are not the functions that are needed to implement the point-to-point operations. The reason is that these functions produce data that can be sent to anyone in a communicator (including the sender), whereas when sending to a single, other process, there is more freedom in choosing the data representation.Strangely, the MPI Forum considered but did not accept the functions needed for packing and unpacking data sent between two specific processes; this decision may have been because there was less experience with heterogeneous environments. The MPICH implementation uses internal versions of MPI_PACK and MPI_UNPACK that work with data intended either for a specific process or for all members of a communicator.