MPI_WIN_GET_ATTR(3)
π MPI_WIN_GET_ATTR π
okay so first things first: this page is from the Open MPI manual, and honestly? it's short and sweet. we love a low-effort icon. π
β¨ NAME β¨
MPI_Win_get_attr β Obtains the value of a window attribute.
like. it gets you the value of an attribute that's attached to a window. that's the whole vibe. πͺ
πΈ SYNTAX πΈ
π C Syntax π
#include <mpi.h>
int MPI_Win_get_attr(MPI_Win win, int win_keyval,
void *attribute_val, int *flag)
π Fortran Syntax π
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_WIN_GET_ATTR(WIN, WIN_KEYVAL, ATTRIBUTE_VAL, FLAG, IERROR)
INTEGER WIN, WIN_KEYVAL, IERROR
INTEGER(KIND=MPI_ADDRESS_KIND) ATTRIBUTE_VAL
LOGICAL FLAG
π Fortran 2008 Syntax π
USE mpi_f08
MPI_Win_get_attr(win, win_keyval, attribute_val, flag, ierror)
TYPE(MPI_Win), INTENT(IN) :: win
INTEGER, INTENT(IN) :: win_keyval
INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π«Ά INPUT PARAMETERS π«Ά
winβ the window the attribute is attached to, bestie (it's a handle).win_keyvalβ the key value, and yes it's an integer (integer).
π OUTPUT PARAMETERS π
attribute_valβ the attribute value, unlessag = false. πflagβ false if no attribute is associated with the key (logical).ierrorβ Fortran only: error status (integer).
π¦ DESCRIPTION π¦
Obtains the value of a window attribute. that's it, that's the description. short queen energy. β¨
π₯ ERRORS π₯
okay so here's where it gets real. Almost all MPI routines return an error value β C routines hand it back as the return result of the function, and Fortran routines drop it in the last argument. no cap.
Before that error value makes it back to you, the current MPI error handler associated with the communication object (so like, communicator, window, file) gets called. If there's no communication object attached to the MPI call, then the call is considered attached to MPI_COMM_SELF and it'll call the associated MPI error handler. And when MPI_COMM_SELF isn't 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. The initial error handler can be changed by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when you're using the World model, or via 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. π
Open MPI includes three predefined error handlers you can use, and they are:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. (yes. all of them. goodbye.)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.MPI_ERRORS_RETURNβ returns an error code to the application. polite king behavior. π
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. so like, don't count on it, 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.
π Copyright π
2003-2026, The Open MPI Community
and that's the whole page, babes π this was the Open MPI version of MPI_WIN_GET_ATTR(3), dated Sep 10, 2026 β love that for us. now go get those window attributes. bye bestie!! πβ¨π¦πΈ
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms