20.3.3. Initialization

PreviousUpNext
Up: Language Interoperability Next: Concerns specific to the World Model Previous: Assumptions

Two approaches are available for initializing MPI: the World Model(Section The World Model) , and the Sessions Model(Section The Sessions Model).


PreviousUpNext
Up: Language Interoperability Next: Concerns specific to the World Model Previous: Assumptions


20.3.3.1. Concerns specific to the World Model

PreviousUpNext
Up: Initialization Next: Concerns specific to the Sessions Model Previous: Initialization

A call to MPI_INIT or MPI_INIT_THREAD, from any language, initializes MPI for execution in all languages.


Advice to users.

Certain implementations use the (inout) argc, argv arguments of the C version of MPI_INIT in order to propagate values for argc and argv to all executing MPI processes. Use of the Fortran version of MPI_INIT to initialize MPI may result in a loss of this ability. ( End of advice to users.)
The function MPI_INITIALIZED returns the same answer in all languages.

The function MPI_FINALIZE finalizes the MPI environments for all languages.

The function MPI_FINALIZED returns the same answer in all languages.

The MPI environment is initialized in the same manner for all languages by MPI_INIT. E.g., MPI_COMM_WORLD carries the same information regardless of language: same MPI processes, same environmental attributes, same error handlers.


Advice to users.

The use of several languages in one MPI program may require the use of special options at compile and/or link time. ( End of advice to users.)

Advice to implementors.

Implementations may selectively link language specific MPI libraries only to codes that need them, so as not to increase the size of binaries for codes that use only one language. The MPI initialization code needs to perform initialization for a language only if that language library is loaded. ( End of advice to implementors.)


PreviousUpNext
Up: Initialization Next: Concerns specific to the Sessions Model Previous: Initialization


20.3.3.2. Concerns specific to the Sessions Model

PreviousUpNext
Up: Initialization Next: Concerns common to both the World Model and the Sessions Model Previous: Concerns specific to the World Model

A call to MPI_SESSION_INIT from any language initializes a session that can be used from all languages.

A call to MPI_SESSION_FINALIZE from any language finalizes the session for all languages.


PreviousUpNext
Up: Initialization Next: Concerns common to both the World Model and the Sessions Model Previous: Concerns specific to the World Model


20.3.3.3. Concerns common to both the World Model and the Sessions Model

PreviousUpNext
Up: Initialization Next: Transfer of Handles Previous: Concerns specific to the Sessions Model

The function MPI_ABORT kills MPI processes in the group of the supplied communicator, irrespective of the language used by the caller or by the MPI processes killed.

Information can be added to info objects in one language and retrieved in another.


PreviousUpNext
Up: Initialization Next: Transfer of Handles Previous: Concerns specific to the Sessions Model


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023