MPI_COMM_GET_INFO(3)
π MPI_COMM_GET_INFO(3) β¨
okay bestie, welcome to the Open MPI manual page for MPI_Comm_get_info β yes the whole page, yes in the Open MPI collection, and yes it's giving "let me peek at your hints" energy. sit down, hydrate, let's go π«Ά
πΈ SYNTAX πΈ
β¨ C Syntax
#include <mpi.h>
int MPI_Comm_get_info(MPI_Comm comm, MPI_Info *info_used)
β¨ Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_COMM_GET_INFO(COMM, INFO_USED, IERROR)
INTEGER COMM, INFO_USED, IERROR
β¨ Fortran 2008 Syntax
USE mpi_f08
MPI_Comm_get_info(comm, info_used, ierror)
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Info), INTENT(OUT) :: info_used
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π INPUT PARAMETERS π
commβ the communicator you're pulling those active info hints from. like, the source of truth. the main character of this call π
π¦ OUTPUT PARAMETERS π¦
info_usedβ a brand new info object that comes back holding all the active hints on this communicator. fresh out the box, no cap β¨ierrorβ Fortran only, bestie: the error status, and it's an integer π
π DESCRIPTION π
so MPI_Comm_get_info returns a new info object containing the hints of the communicator associated with comm. literally that's the whole vibe.
the current setting of all hints actually used by the system related to this communicator gets returned in info_used. like, not the ones you wished for β the ones the system is genuinely running with π
and if no such hints exist? don't panic π a handle to a newly created info object is returned that contains no key/value pair. empty. clean. iconique. and yeah β you, the user, are responsible for freeing info_used via MPI_Info_free. don't leave it hanging, that's not cute π
π₯ ERRORS π₯
almost all MPI routines return an error value, periodt. C routines get it as the return result of the function, and Fortran routines get it in the last argument π«Ά
before that error value comes back, the current MPI error handler associated with the communication object (think: communicator, window, file) gets called. and if there's no communication object associated with the MPI call, then the call is considered attached to MPI_COMM_SELF and will call the associated MPI error handler. iykyk.
when MPI_COMM_SELF is not initialized β i.e., before MPI_Init/MPI_Init_thread, after MPI_Finalize, or when using the Sessions Model exclusively β the error raises the initial error handler. and you can change that initial error handler by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when using the World model, or via the mpi_initial_errhandler CLI argument to mpiexec, or via the info key to MPI_Comm_spawn/MPI_Comm_spawn_multiple. slay, options π
and 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. that's the rule, no cap.
Open MPI includes three predefined error handlers that can be used, and honestly they're a whole trio β
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. dramatic? yes. effective? also yes π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_Abortwas called on that communicator. if called on a window or file, it acts as ifMPI_Abortwas called on a communicator containing the group of processes in the corresponding window or file. if called on a session, it aborts only the local process. context-sensitive king πMPI_ERRORS_RETURNβ returns an error code to the application. chill. polite. hands you the receipt π§Ύ
MPI applications can also implement their own error handlers by calling:
MPI_Comm_create_errhandlerthenMPI_Comm_set_errhandlerMPI_File_create_errhandlerthenMPI_File_set_errhandlerMPI_Session_create_errhandlerthenMPI_Session_set_errhandleror atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
β οΈ note that MPI does not guarantee that an MPI program can continue past an error. like, fr fr, do not assume it bounces back π
see the MPI man page for a full list of MPI error codes. and see the Error Handling section of the MPI-3.1 standard for more information. go read, bestie, it's good for you π
π SEE ALSO π
MPI_Comm_get_infoMPI_Info_free
π COPYRIGHT π
2003-2026, The Open MPI Community
and that's the page, bestie!! π big slay to the Open MPI crew β copyright 2003-2026, The Open MPI Community, and this lil masterpiece is dated Sep 11, 2026. go free your info objects and stan responsibly πβ¨
π¦ where this page comes from
- arch rolling: openmpi 5.0.11-1 Β· BSD-3-Clause AND LicenseRef-MPICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms