MPI_INFO_SET(3)
β¨ MPI_INFO_SET(3) β¨
okay so bestie, we're in the Open MPI corner of the manual today, and this one is literally the "add a thing to the thing" function π
π NAME π
MPI_Info_set β adds a key/value pair to info. that's it, that's the vibe π
πΈ SYNTAX πΈ
π¦ C Syntax
#include <mpi.h>
int MPI_Info_set(MPI_Info info, const char *key, const char *value)
π¦ Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_INFO_SET(INFO, KEY, VALUE, IERROR)
INTEGER INFO, IERROR
CHARACTER*(*) KEY, VALUE
π¦ Fortran 2008 Syntax
USE mpi_f08
MPI_Info_set(info, key, value, ierror)
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: key, value
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π INPUT/OUTPUT PARAMETER π
infoβ the Info object, a handle. main character energy, it goes in and comes out changed β¨
π INPUT PARAMETERS π
keyβ the key, a string. yes bestie, a string πvalueβ the value, also a string. also a string π
π OUTPUT PARAMETER π
ierrorβ Fortran only: the error status (an integer). Fortran girlies get their errors in the last argument, no cap πΈ
π DESCRIPTION π
so like, MPI_Info_set adds the (key,value) pair to info, and it overrides the value if a value for the same key was already set. it does not ask, it does not negotiate, it just overrides π
the key and value parameters are null-terminated strings in C. in Fortran, leading and trailing spaces in key and value are stripped. and listen β if either key or value is larger than the allowed maximums, the error MPI_ERR_INFO_KEY or MPI_ERR_INFO_VALUE is raised, respectively. that's the line, don't cross it π«
π ERRORS π
almost all MPI routines return an error value, fr fr: 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_thread, after 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 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_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. 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, acts as ifMPI_Abortwas 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. the chill one π
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, bestie, it might just not π
see the MPI man page for a full list of MPI error codes.
see the Error Handling section of the MPI-3.1 standard for more information.
π SEE ALSO π
MPI_Info_createMPI_Info_deleteMPI_Info_dupMPI_Info_freeMPI_Info_set
(i know, MPI_Info_set is in its own SEE ALSO list. iconic behaviour, honestly π)
π§ COPYRIGHT π§
2003-2026, The Open MPI Community β love that for them π
and that's the whole page, bestie! this one shipped with Open MPI, dated Sep 11, 2026, and the footer reads MPI_INFO_SET(3) right back at you. slay, go set some keys π¦β¨
π¦ 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