MPI_WIN_GET_INFO(3)

๐Ÿ’– MPI_WIN_GET_INFO ๐Ÿ’–

okay bestie, welcome to the Open MPI girlies' guide to MPI_Win_get_info โœจ โ€” the little function that Retrieves active window info hints. That's the whole vibe. That's the whole NAME. Slay.


โœจ 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 asking for active info hints from, bestie. that's it. that's the input. ๐Ÿ’…

๐ŸŽ€ OUTPUT PARAMETERS ๐ŸŽ€

  • info_used โ€” a brand new info object, returned to you, stuffed with all the active hints on this window. fresh out the box fr fr ๐Ÿซถ
  • ierror โ€” Fortran only, baby: error status (integer).

๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

okay so here's the tea ๐Ÿ“:

MPI_Win_get_info returns a new info object containing the hints of the window that's chillin' in win. The current setting of all hints that the system is actually using related to this window gets handed back in info_used. no guessing, no vibes-based answers, the real ones.

And if no such hints exist? not a problem, not a crisis ๐Ÿ’€ โ€” you still get a handle to a newly created info object, it just contains no key/value pair. empty. minimal. iconique.

โš ๏ธ bestie listen to me rn: you are responsible for freeing info_used via MPI_Info_free. not the library. not the system. you. it's giving main character responsibility ๐Ÿ˜ญ

๐Ÿ’€ 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. no cap.

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. 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. ๐Ÿ˜ฎโ€๐Ÿ’จ

๐ŸŒˆ Open MPI ships three predefined error handlers you can use

  • MPI_ERRORS_ARE_FATAL โ€” Causes the program to abort all connected MPI processes. yeah. all of them. dramatic but honest ๐Ÿ’…
  • 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, it aborts only the local process.
  • MPI_ERRORS_RETURN โ€” Returns an error code to the application. polite, respectful, hands it back to you ๐Ÿคฒ

๐Ÿงต You can also write your 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, do not assume you get to keep living your life after this. โšฐ๏ธ

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

2003-2026, The Open MPI Community


and that's the whole page, bestie, you ate it up ๐ŸŽ€โœจ go forth and free your info_used, i'm literally so proud of you. mwah. ๐Ÿ’‹

โ€” written under the Open MPI banner, dated Sep 10, 2026 (yes the date came from the footer, and yes i'm putting it here in a cute sign-off because i was told to, and i always follow instructions ๐Ÿ‘‘๐Ÿ’œ)

๐Ÿ“ฆ where this page comes from