Handles for MPI objects are defined to be incomplete struct pointers, which allows for C compilers to do type-checking, while also satisfying the existing requirements, such as equality comparison.
Rationale.
Integer handles do not provide type safety, while struct or union handles
fail to satisfy the existing API requirements.
( End of rationale.)
The following handle type definitions are part of the MPI ABI:
typedef struct MPI_ABI_Comm* MPI_Comm; typedef struct MPI_ABI_Datatype* MPI_Datatype; typedef struct MPI_ABI_Errhandler* MPI_Errhandler; typedef struct MPI_ABI_File* MPI_File; typedef struct MPI_ABI_Group* MPI_Group; typedef struct MPI_ABI_Info* MPI_Info; typedef struct MPI_ABI_Message* MPI_Message; typedef struct MPI_ABI_Op* MPI_Op; typedef struct MPI_ABI_Request* MPI_Request; typedef struct MPI_ABI_Session* MPI_Session; typedef struct MPI_ABI_Win* MPI_Win;