MPI_Request_get_status_all(3)

๐Ÿ’– MPI_Request_get_status_all(3) ๐Ÿ’–

okay bestie, welcome to the MPI manual page for MPI_Request_get_status_all โ€” yes that's the whole name, it's giving "I have a lot of requests and I need to check them all at once" energy and honestly? iconic. ๐ŸŽ€

Nondestructive test for the completion of all requests โœจ

Like, it peeks ๐Ÿ‘€ at every request you hand it and tells you if they're all done โ€” and it does it without destroying anything. No cap.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

int MPI_Request_get_status_all(int count, const MPI_Request array_of_requests[],
int *flag, MPI_Status *array_of_statuses)

๐Ÿฆ‹ INPUT PARAMETERS ๐Ÿฆ‹

  • count โ€” the count, bestie. A non-negative integer. That's the vibe.
  • array_of_requests โ€” an array of requests (handle). Yes, the whole squad. ๐Ÿ‘‘

๐Ÿ’… OUTPUT PARAMETERS ๐Ÿ’…

  • flag โ€” the flag (logical). It's the little boolean that tells you what's up. ๐Ÿšฉ
  • array_of_statuses โ€” an array of status objects (Status). Every request gets its own lil status receipt. ๐Ÿงพ

๐Ÿ”ฅ THREAD AND INTERRUPT SAFETY ๐Ÿ”ฅ

This routine is thread-safe. Translation: multiple threads can use it at the same time and you do NOT need to bring your own thread locks. She handles herself. ๐Ÿ’โ€โ™€๏ธ

โš ๏ธ BUT. It is not interrupt safe. The reason is typically that it uses memory allocation routines like malloc, or other non-MPICH runtime routines, and those routines are themselves not interrupt-safe. So don't come for her about interrupts, that's a whole other department. ๐Ÿ˜ญ

๐ŸŽ€ NOTES FOR FORTRAN ๐ŸŽ€

Every MPI routine in Fortran has an extra argument called ierr chillin' at the end of the argument list โ€” the only exceptions are MPI_WTIME and MPI_WTICK. ๐Ÿ“

ierr is an integer and it means the exact same thing as the return value of the routine in C. And in Fortran, MPI routines are subroutines, so you invoke them with the call statement. periodt.

Also: all MPI objects (like MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. Yes, all of them. ๐Ÿ’œ


๐Ÿ˜ญ ERRORS ๐Ÿ˜ญ

All MPI routines (except MPI_Wtime and MPI_Wtick) return an error value โ€” C routines as the value of the function, and Fortran routines in the last argument. Before that value comes back to you, the current MPI error handler gets called. By default, this error handler aborts the MPI job. like, the whole thing. bye. ๐Ÿ’€

The error handler can be changed with:

  • MPI_Comm_set_errhandler (for communicators)
  • MPI_File_set_errhandler (for files)
  • MPI_Win_set_errhandler (for RMA windows)

The MPI-1 routine MPI_Errhandler_set may be used but its use is deprecated so maybe don't, bestie. ๐Ÿ™ˆ

The predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error; however, MPI implementations will attempt to continue whenever possible. โœจ

Here are the error classes, one by one, no skipping:

  • MPI_SUCCESS โ€” No error; MPI routine completed successfully. slay. ๐ŸŽ‰
  • MPI_ERR_ARG โ€” Invalid argument. Some argument is invalid and is not identified by a specific error class (e.g., MPI_ERR_RANK). ๐Ÿคจ
  • MPI_ERR_COUNT โ€” Invalid count argument. Count arguments must be non-negative; a count of zero is often valid. ๐Ÿงฎ
  • MPI_ERR_REQUEST โ€” Invalid MPI_Request. Either null or, in the case of a MPI_Start or MPI_Startall, not a persistent request. ๐Ÿšซ
  • MPI_ERR_OTHER โ€” Other error; use MPI_Error_string to get more information about this error code. ๐Ÿ”

and that's the whole page, bestie!! go forth and check all your requests at once, nondestructively, like the main character you are ๐Ÿ‘‘๐Ÿ’–โœจ

mwah ๐Ÿ’‹ โ€” this lil rewrite comes to you from the MPI manual, dated 4/10/2026, page MPI_Request_get_status_all(3). take care of her ๐Ÿซถ

๐Ÿ“ฆ where this page comes from