MPI_Request_get_status_some(3)
π MPI_Request_get_status_some(3) β the MPI manual page, but make it make sense π
okay bestie, pull up a chair π«Ά this one is from the MPI manual, and it's genuinely one of the cutest non-blocking tricks in the whole toolkit. no cap.
β¨ NAME β¨
MPI_Request_get_status_some β a nondestructive test to see if some of your requests have finished. like, a little peek. a vibe check. you look, but you don't touch. π
πΈ SYNOPSIS πΈ
int MPI_Request_get_status_some(int incount,
const MPI_Request array_of_requests[],
int *outcount, int array_of_indices[],
MPI_Status *array_of_statuses)
π INPUT PARAMETERS π
incountβ how longarray_of_requestsis (a non-negative integer, so no negatives, we don't do that here π )array_of_requestsβ the array of requests (handle). yes, it's a handle situation. iconic.
π¦ OUTPUT PARAMETERS π¦
outcountβ how many requests actually completed (integer)array_of_indicesβ the array of indices of the operations that completed (integer). so like, which ones popped off.array_of_statusesβ the array of status objects for the operations that completed (Status)
π§΅ THREAD AND INTERRUPT SAFETY π§΅
This routine is thread-safe. that means multiple threads can use it at the same time and you do not need to bring your own thread locks β she handles herself. πββοΈ
but bestie. she is not interrupt safe. π typically that's because of memory allocation routines like malloc or other non-MPICH runtime routines that themselves are not interrupt-safe. so like, don't interrupt her mid-glow-up.
π NOTES FOR FORTRAN π
Every MPI routine in Fortran (except for MPI_WTIME and MPI_WTICK) gets an extra argument called ierr tacked on at the end of the argument list. ierr is an integer and it means the exact same thing as the return value of the routine in C.
In Fortran, MPI routines are subroutines, and you invoke them with the call statement.
Also, all MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. yes, all of them. periodt.
π 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 that last argument. Before the value is returned, the current MPI error handler is called. And by default? that error handler aborts the MPI job. like, full dramatic exit. πͺπ₯
The error handler can be changed with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows). The MPI-1 routine MPI_Errhandler_set may be used but its use is deprecated (old news, move on bestie). The predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned instead.
note that MPI does not guarantee that an MPI program can continue past an error; however, MPI implementations will attempt to continue whenever possible. so like... fingers crossed. π€
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β invalidMPI_Request. either null or, in the case of aMPI_StartorMPI_Startall, not a persistent request.MPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code.
and that's the whole page, bestie π«Άπ you ate. no crumbs. MPI manual, dated 4/10/2026 β go forth and check your requests without wrecking them. mwah. π ππ¦
π¦ where this page comes from
- nixos 26.05: mpich 5.0.1
- ubuntu stonking: mpich-doc 5.0.1-9 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms