MPI_WIN_GET_INFO(3)

๐Ÿ’– MPI_Win_get_info โ€” hi bestie, welcome to the Open MPI glow-up ๐Ÿ’–

okay so this is the MPI_Win_get_info(3) page from the Open MPI manual, and it's genuinely iconic โ€” it's your little window-info receipts getter. let's get into it โœจ


๐ŸŒธ NAME ๐ŸŒธ

MPI_Win_get_info โ€” retrieves active window info hints. that's it, that's the whole vibe. it hands you back the hints your window is actually running with ๐Ÿ’…


โœจ SYNTAX โœจ

๐ŸŽ€ C Syntax

#include <mpi.h>

int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used)

๐ŸŽ€ Fortran Syntax

USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_WIN_GET_INFO(WIN, INFO_USED, IERROR)
     INTEGER WIN, INFO_USED, IERROR

๐ŸŽ€ Fortran 2008 Syntax

USE mpi_f08
MPI_Win_get_info(win, info_used, ierror)
     TYPE(MPI_Win), INTENT(IN) :: win
     TYPE(MPI_Info), INTENT(OUT) :: info_used
     INTEGER, OPTIONAL, INTENT(OUT) :: ierror

๐Ÿฆ‹ INPUT PARAMETERS ๐Ÿฆ‹

  • win โ€” the window you're pulling active info hints from. like, "hey bestie, what hints are you actually using?" that window. ๐Ÿซถ

๐ŸŒˆ OUTPUT PARAMETERS ๐ŸŒˆ

  • info_used โ€” a brand-new info object, returned with all the active hints on this window. new handle, fresh out the box โœจ
  • ierror โ€” Fortran only: the error status, as an integer. keeping it old-school ๐Ÿ’œ

๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

okay so MPI_Win_get_info returns a new info object containing the hints of the window associated with win. the current setting of all hints actually used by the system related to this window gets returned in info_used โ€” not the hints you wished for, the ones that are real ๐Ÿ’…

and here's the cute little edge case: if no such hints exist, you still get a handle to a newly created info object, it just contains no key/value pair. empty but valid. main character energy, honestly. ๐ŸŽ€

โš ๏ธ bestie, listen โ€” you are responsible for freeing info_used via MPI_Info_free. don't just leave it lying around, that's not slay, that's a leak ๐Ÿ˜ญ

๐Ÿ’€ 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. fr fr that's just how it works.

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. full send, no survivors ๐Ÿ’€
  • 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, 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, aborts only the local process. ๐Ÿ”ฅ
  • MPI_ERRORS_RETURN โ€” returns an error code to the application. polite, hands you the problem back ๐Ÿซถ

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, no cap, after an error all bets are off ๐Ÿ™ˆ

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_Win_set_info
  • MPI_Win_free

2003-2026, The Open MPI Community


and that's the whole page, bestie โ€” signed, sealed, and delivered by the Open MPI girlies on Sep 11, 2026. MPI_WIN_GET_INFO(3) out. slay, go free your info object ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from