When using the World Model (Section The World Model) for MPI initialization, an initial intracommunicator MPI_COMM_WORLD of all MPI processes the local MPI process can communicate with after initialization (itself included) is defined once MPI_INIT or MPI_INIT_THREAD has been called. In addition, the communicator MPI_COMM_SELF is provided, which includes only the MPI process itself. When using the Sessions Model (Section The Sessions Model) for initialization of MPI resources, MPI_COMM_WORLD and MPI_COMM_SELF are not valid for use as a communicator. See the discussion concerning use of MPI named constants in Named Constants for valid uses of MPI_COMM_WORLD and MPI_COMM_SELF prior to initialization of MPI. See also the discussion concerning interoperability of the World Model and Sessions Model in Section Introduction.
The predefined constant MPI_COMM_NULL is the value used for invalid communicator handles.
In a static-process-model implementation of MPI, all MPI processes that participate in the computation are available after MPI is initialized. For this case, MPI_COMM_WORLD is a communicator of all MPI processes available for the computation; this communicator has the same value in all MPI processes. In an implementation of MPI where MPI processes can dynamically join an MPI execution, it may be the case that an MPI process starts an MPI computation without having access to all other MPI processes. In such situations, MPI_COMM_WORLD is a communicator incorporating all MPI processes with which the joining MPI process can immediately communicate. Therefore, MPI_COMM_WORLD may simultaneously represent disjoint groups in different MPI processes.
All MPI implementations are required to provide the MPI_COMM_WORLD communicator. It cannot be deallocated during the life of an MPI process. The group corresponding to this communicator does not appear as a pre-defined constant, but it may be accessed using MPI_COMM_GROUP (see below). MPI does not specify the correspondence between the MPI process rank in MPI_COMM_WORLD and its (machine-dependent) absolute address. Other implementation-dependent, predefined communicators may also be provided.