MPI_REQUEST_GET_STATUS(3)
π MPI_REQUEST_GET_STATUS π
okay bestie, welcome to the Open MPI manual page for MPI_Request_get_status β yes it's giving very "peek at ur request without ghosting it" energy and honestly? obsessed. no cap.
πΈ NAME πΈ
MPI_Request_get_status β peek at all the info hanging off a request without freeing that request. like reading the text message but not deleting the chat. π
β¨ SYNTAX β¨
π C Syntax
#include <mpi.h>
int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_REQUEST_GET_STATUS(REQUEST, FLAG, STATUS, IERROR)
INTEGER REQUEST, STATUS(MPI_STATUS_SIZE), IERROR
LOGICAL FLAG
π Fortran 2008 Syntax
USE mpi_f08
MPI_Request_get_status(request, flag, status, ierror)
TYPE(MPI_Request), INTENT(IN) :: request
LOGICAL, INTENT(OUT) :: flag
TYPE(MPI_Status) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π«Ά INPUT PARAMETER
requestβ the communication request, i.e. the handle. it's the little guy you're checking up on. (handle)
π OUTPUT PARAMETERS
flagβ a boolean flag, literally the same one you'd get fromMPI_Testπ (logical)statusβ theMPI_Statusobject, but only ifflagis true. no flag, no status, that's the rule. (status)
π DESCRIPTION π
MPI_Request_get_status sets flag = true if the operation is complete, or sets flag = false if it's not complete. main character behavior: tell it like it is. π₯
and if the operation is complete, it hands you the request status in status. so far so good.
BUT β and this is the important part, bestie, do not skip this β it does not deallocate or deactivate the request. the request is still there, still valid, still yours. you should follow up with a subsequent call to test, wait, or free with that request. periodt. π
if your app doesn't actually need to look at the status field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the status argument. iconic little shortcut, iykyk. β¨
π ERRORS π
almost all MPI routines return an error value: C routines hand it back as the return result of the function, and Fortran routines put it in the last argument. fr fr.
before that error value comes back to you, the current MPI error handler associated with the communication object (think: communicator, window, file) gets called. and if there's no communication object associated with the MPI call, then the call counts as attached to MPI_COMM_SELF and it'll call the associated MPI error handler. and when MPI_COMM_SELF isn't initialized β i.e. 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 using the World model, or via the mpi_initial_errhandler CLI argument to mpiexec, or an 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:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. yeah. all of them. π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.
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, it might just be over. no promises. π
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
aaand that's the whole page bestie, you ate it, go forth and check ur requests responsibly π¦β¨
Open MPI β MPI_REQUEST_GET_STATUS(3) β Sep 10, 2026 π
π¦ 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