MPI_SESSION_GET_INFO(3)
π MPI_SESSION_GET_INFO π
okay so bestie, we're reading the Open MPI manual, section 3 β yeah, MPI_SESSION_GET_INFO(3), she's iconic, she's got lore. sit down, grab a boba, let's get into it π§β¨
πΈ NAME πΈ
MPI_Session_get_info β returns an info object containing the hints of an MPI Session
fr fr that's the whole vibe: you hand her a session, she hands you back the hints. π
π¦ SYNTAX π¦
C Syntax
#include <mpi.h>
int MPI_Session_get_info(MPI_Session session, MPI_Info *info_used)
Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_SESSION_GET_INFO(SESSION, INFO_USED)
INTEGER SESSION, INFO_USED
Fortran 2008 Syntax
USE mpi_f08
MPI_Session_get_info(session, info_used)
TYPE(MPI_Session), INTENT(IN) :: session
TYPE(MPI_Info), INTENT(OUT) :: info_used
not the USE mpi_f08 era being the glow-up era πβ¨
π INPUT PARAMETERS π
session: session (handle)
that's it. one (1) singular input. she's low maintenance, she's a queen. π
π«Ά OUTPUT PARAMETERS π«Ά
info_used: info object (handle)ierror: Fortran only: Error status (integer).
β¨ DESCRIPTION β¨
okay so MPI_Session_get_info returns a brand new info object containing the hints of the MPI Session associated with session. like, a fresh one. a whole new handle, built just for you. π
The current setting of all hints related to this MPI Session comes back in info_used. not some of them β all of them. and here's what the implementation is required to hand over:
- all hints that are supported by the implementation and have default values specified;
- any user-supplied hints that were not ignored by the implementation;
- any additional hints that were set by the implementation.
And if no such hints exist at all? no problem, bestie β a handle to a newly created info object is returned that contains no key/value pair. empty info object, zero keys, still valid, still real, still a whole handle. it's giving minimalism. it's giving "I have nothing and that's my truth". π
β NOTES β
the user is responsible for freeinginfo_usedviaMPI_Info_free <#mpi-info-free>.
like. YOU. you free it. nobody else is gonna do it for you, bestie. that info object is yours now, it's your child, you must release it back into the wild with MPI_Info_free <#mpi-info-free>. don't ghost it, that's a memory leak and memory leaks are not the vibe. π
π ERRORS π
Almost all MPI routines return an error value; C routines as the return result of the function and Fortran routines in the last argument.
Before the error value is returned, the current MPI error handler associated with the communication object (e.g., communicator, window, file) is called. If no communication object is associated with the MPI call, then the call is considered attached to MPI_COMM_SELF and will call the associated MPI error handler. When MPI_COMM_SELF is not initialized (i.e., before MPI_Init <#mpi-init>/MPI_Init_thread <#mpi-init-thread>, after MPI_Finalize <#mpi-finalize>, or when using the Sessions Model exclusively) the error raises the initial error handler. The initial error handler can be changed by calling MPI_Comm_set_errhandler <#mpi-comm-set-errhandler> on MPI_COMM_SELF when using the World model, or the mpi_initial_errhandler CLI argument to mpiexec or info key to MPI_Comm_spawn <#mpi-comm-spawn>/MPI_Comm_spawn_multiple <#mpi-comm-spawn-multiple>. If no other appropriate error handler has been set, then the MPI_ERRORS_RETURN error handler is called for MPI I/O functions and the MPI_ERRORS_ABORT error handler is called for all other MPI functions.
Open MPI includes three predefined error handlers that can be used:
MPI_ERRORS_ARE_FATALβ Causes the program to abort all connected MPI processes.MPI_ERRORS_ABORTβ An error handler that can be invoked on a communicator, window, file, or session. When called on a communicator, it acts as ifMPI_Abort <#mpi-abort>was called on that communicator. If called on a window or file, acts as ifMPI_Abort <#mpi-abort>was called on a communicator containing the group of processes in the corresponding window or file. If called on a session, aborts only the local process.MPI_ERRORS_RETURNβ Returns an error code to the application.
MPI applications can also implement their own error handlers by calling:
MPI_Comm_create_errhandler <#mpi-comm-create-errhandler>thenMPI_Comm_set_errhandler <#mpi-comm-set-errhandler>MPI_File_create_errhandler <#mpi-file-create-errhandler>thenMPI_File_set_errhandler <#mpi-file-set-errhandler>MPI_Session_create_errhandler <#mpi-session-create-errhandler>thenMPI_Session_set_errhandler <#mpi-session-set-errhandler>or atMPI_Session_init <#mpi-session-init>MPI_Win_create_errhandler <#mpi-win-create-errhandler>thenMPI_Win_set_errhandler <#mpi-win-set-errhandler>
Note that MPI does not guarantee that an MPI program can continue past an error. like, no cap, an error can be the end of the road. π
See the MPI man page <#open-mpi> for a full list of MPI error codes <#open-mpi-errors>.
See the Error Handling section of the MPI-3.1 standard for more information.
See also:
MPI_Session_init <#mpi-session-init>
π SEE ALSO π
MPI_Session_init <#mpi-session-init>
(yeah she said it twice, she's thorough, she's a Virgo π )
π Copyright π
2003-2026, The Open MPI Community
okay bestie that's the whole page, you ate, I'm obsessed π«Άβ¨ this was the Sep 10, 2026 printing of MPI_SESSION_GET_INFO(3), straight from the Open MPI manual set β now go free that info object, mwah π
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms