Every handle type has at least one, and often many, predefined constants of that type, e.g., MPI_REQUEST_NULL for MPI_Request and MPI_COMM_WORLD for MPI_Comm. The MPI ABI defines handle constants to be compile-time constants, which are specified as integer expressions cast to the appropriate handle type.
Rationale.
Link-time constants, while convenient, are not strictly portable.
( End of rationale.)
All predefined handle constants correspond to integer representations
that are unlikely to be valid addresses, and must not be dereferenced.
Implementations must ensure that the handles they create for the user
are never in the range reserved for predefined handle constants.
The MPI ABI reserves values corresponding to
the integers 1 to 4095 for predefined handle constants.
The definition of these constants is described in Section Handle Constants.
Handle arguments with an integer representation of zero are never valid handles.
Rationale.
Many operating systems support a ``zero page'' that corresponds
to the above address range, in which case, implementations
will not need to do any runtime checking to ensure the above requirement is satisfied.
Ensuring that an integer representation of zero is never a legal handle
argument allows the detection of uninitialized data, which may lead to
undefined behavior.
( End of rationale.)
All of the constants are specified in Section Defined Constants.