MPI_INFO_CREATE(3)

✨ NAME ✨

MPI_Info_create β€” bestie, it literally creates you a shiny new info object πŸ’–

(hi hello this is page MPI_INFO_CREATE(3) from the Open MPI manual, section 3, and yes we're doing this together 🫢)


🌈 SYNTAX 🌈

πŸ’… C Syntax

#include <mpi.h>

int MPI_Info_create(MPI_Info *info)

πŸŽ€ Fortran Syntax

USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_INFO_CREATE(INFO, IERROR)
     INTEGER INFO, IERROR

πŸ¦‹ Fortran 2008 Syntax

USE mpi_f08
MPI_Info_create(info, ierror)
     TYPE(MPI_Info), INTENT(OUT) :: info
     INTEGER, OPTIONAL, INTENT(OUT) :: ierror

🌸 OUTPUT PARAMETERS 🌸

  • info β€” the info object that just got created, as a handle. it's giving newborn-baby-gorgeous πŸ‘‘
  • ierror β€” Fortran girlies only: your error status, an INTEGER. lowkey important, don't ignore her.

⭐ DESCRIPTION ⭐

okay so MPI_Info_create creates a new info object. that's the whole job. and the newly created object contains no key/value pairs β€” like, it's fresh, it's empty, it's an absolute blank slate, main character energy fr fr ✨. fill it in later, bestie, no rush.


πŸ’€ ERRORS πŸ’€

almost all MPI routines return an error value, no cap. C routines give it back to you as the return result of the function, and Fortran routines stash it in the last argument. periodt.

but here's the tea: before that error value comes back to you, the current MPI error handler associated with the communication object (think communicator, window, file β€” y'know, the usual suspects) 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 it'll call the associated MPI error handler. iconic behavior tbh.

when MPI_COMM_SELF is not initialized β€” meaning before MPI_Init / MPI_Init_thread, after MPI_Finalize, or when you're 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 you're using the World model, or
  • using the mpi_initial_errhandler CLI argument to mpiexec, or
  • the info key to MPI_Comm_spawn / MPI_Comm_spawn_multiple

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 just how it goes 🫠

Open MPI includes three predefined error handlers that you can use:

  • MPI_ERRORS_ARE_FATAL β€” causes the program to abort all connected MPI processes. dramatic?? yes. but on purpose πŸ’€
  • 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 if MPI_Abort was called on that communicator. If called on a window or file, it acts as if MPI_Abort was 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.
  • 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_errhandler then MPI_Comm_set_errhandler
  • MPI_File_create_errhandler then MPI_File_set_errhandler
  • MPI_Session_create_errhandler then MPI_Session_set_errhandler or at MPI_Session_init
  • MPI_Win_create_errhandler then MPI_Win_set_errhandler
⚠️ note that MPI does not guarantee that an MPI program can continue past an error. like, that's not a vibe check you want to fail, bestie 😭

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. (iykyk πŸ“š)

🧚 see also:

  • MPI_Info_delete
  • MPI_Info_dup
  • MPI_Info_free
  • MPI_Info_get
  • MPI_Info_set

2003-2026, The Open MPI Community


and that's the whole page, bestie!! πŸŽ€ legal girlies said 2003-2026, The Open MPI Community, and this lil doc got stamped Sep 10, 2026 β€” MPI_INFO_CREATE(3), Open MPI, that's a wrap, slay πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from