5.3.2.0.3 The maxprocs argument

MPI-/ tries to spawn maxprocs processes. If it is unable to spawn maxprocs processes, it raises an error of class MPI_ERR_SPAWN.

An implementation may allow the info argument to change the default behavior, such that if the implementation is unable to spawn all maxprocs processes, it may spawn a smaller number of processes instead of raising an error. In principle, the info argument may specify an arbitrary set $\{m_i: 0 \leq m_i \leq
\penalty10000\hskip 0pt plus 8em\penalty4800\hskip 0pt plus-8em\penalty10000 {\sf maxprocs}\}$ of allowed values for the number of processes spawned. The set $\{m_i\}$ does not necessarily include the value maxprocs. If an implementation is able to spawn one of these allowed numbers of processes, MPI_COMM_SPAWN returns successfully and the number of spawned processes, $m$, is given by the size of the remote group of intercomm. If $m$ is less than maxproc, reasons why the other processes were not spawned are given in array_of_errcodes as described below. If it is not possible to spawn one of the allowed numbers of processes, MPI_COMM_SPAWN raises an error of class MPI_ERR_SPAWN.

A spawn call with the default behavior is called hard. A spawn call for which fewer than maxprocs processes may be returned is called soft. See Section 5.3.4 on page [*] for more information on the soft key for info.

Advice to users. By default, requests are hard and MPI-/ errors are fatal. This means that by default there will be a fatal error if MPI-/ cannot spawn all the requested processes. If you want the behavior ``spawn as many processes as possible, up to $N$,'' you should do a soft spawn, where the set of allowed values $\{m_i\}$ is $\{0 \ldots N\}$. However, this is not completely portable, as implementations are not required to support soft spawning. (End of advice to users.)

MPI-Standard for MARMOT