Definition
In C, an MPI datatype is of type MPI_Datatype. When sending a message in MPI, the message length is expressed as a number of elements and not a number of bytes. Example: sending an array that contains 4 ints is expressed as a buffer containing 4 MPI_INT, not 8 or 16 bytes.
List of named predefined dataypes:
- MPI_SIGNED_CHAR / MPI_UNSIGNED_CHAR
- MPI_SHORT / MPI_UNSIGNED_SHORT
- MPI_INT / MPI_UNSIGNED
- MPI_LONG / MPI_UNSIGNED_LONG
- MPI_LONG_LONG_INT (a.k.a MPI_LONG_LONG) / MPI_UNSIGNED_LONG_LONG
- MPI_INT8_T / MPI_UINT8_T
- MPI_INT16_T / MPI_UINT16_T
- MPI_INT32_T / MPI_UINT32_T
- MPI_INT64_T / MPI_UINT64_T
- MPI_BYTE
- MPI_PACKED
List of datatypes for reduction functions MPI_MINLOC and MPI_MAXLOC:
- MPI_SHORT_INT
- MPI_LONG_INT
- MPI_FLOAT_INT
- MPI_DOUBLE_INT
- MPI_LONG_DOUBLE_INT
- MPI_2INT