Most of the burden on support of heterogeneous systems has been moved from the MPI implementation to the MPID implementations that may be heterogeneous (currently, just the ch_p4 and ch_tcp versions). However, there is one place where the MPI implementation needs to understand how heterogeneous data is handled (at least in part), and that is in MPI_Pack and MPI_Unpack. In addition, if the collective routines are implemented in terms of the point-to-point routines, a slightly more powerful form of MPI_Pack and MPI_Unpack are needed; these allow the pack and unpack formats to depend on the destination/source of the message, not just on the communicator. Perhaps the simplest approach is to view the existing MPIR_Pack2 and MPIR_Unpack2 routines as really MPID routines. This is the approach that we recommend.
If the ADI supports heterogeneity, it must define the macro MPID_HAS_HETEROGENEOUS.