17.2.324. MPI_Session_get_num_psets

MPI_Session_get_num_psets - Query runtime for number of available process sets

17.2.324.1. Syntax

17.2.324.1.1. C Syntax

#include <mpi.h>

int MPI_Session_get_num_psets(MPI_Session session, MPI_Info info, int *npset_names)

17.2.324.1.2. Fortran Syntax

USE MPI
! or the older form: INCLUDE 'mpif.h'

MPI_SESSION_GET_NUM_PSETS(SESSION, INFO, NPSET_NAMES, IERROR)
    INTEGER SESSION, INFO, SESSION, IERROR

17.2.324.1.3. Fortran 2008 Syntax

USE mpi_f08

MPI_Session_get_num_psets(session, info, npset_names, ierror)
    TYPE(MPI_Session), INTENT(IN) :: session
    TYPE(MPI_Info), INTENT(IN) :: info
    INTEGER, INTENT(OUT) :: npset_names
    INTEGER, OPTIONAL, INTENT(OUT) :: ierror

17.2.324.2. Input Parameters

  • session : session (handle)

  • info: info object (handle)

17.2.324.3. Output Parameters

  • npset_names : number of available process sets (non-negtive integer)

  • IERROR : Fortran only: Error status (integer).

17.2.324.4. Description

MPI_Session_get_num_psets is used to query the runtime for the number of available process sets in which the calling MPI process is a member. An MPI implementation is allowed to increase the number of available process sets during the execution of an MPI application when new process sets become available. However, MPI implementations are not allowed to change the index of a particular process set name, or to change the name of the process set at a particular index, or to delete a process set name once it has been added.

17.2.324.5. Notes

When a process set becomes invalid, for example, when some processes become unreachable due to failures in the communication system, subsequent usage of the process set name may raise an error. For example, creating an MPI_Group from such a process set might succeed because it is a local operation, but creating an MPI_Comm from that group and attempting collective communication may raise an error.

17.2.324.6. Errors

Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Session_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.

See also

MPI_Session_init