MPIX_Stream_isend(3)
π« MPIX_Stream_isend β the MPIX stream-to-stream nonblocking send π«
okay bestie, gather round, because this one is so specific and honestly kind of iconic. This is a page from the MPI manual set (the MPIX_Stream_isend(3) one, to be exact) π
β¨ NAME β¨
MPIX_Stream_isend β start a nonblocking send from a specific local stream to a specific remote stream πβ‘οΈπ
Like, not just any stream. A specific local one to a specific remote one. The way this is giving targeted delivery π
πΈ SYNOPSIS πΈ
int MPIX_Stream_isend(const void *buf, int count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm, int source_stream_index,
int dest_stream_index, MPI_Request *request)
int MPIX_Stream_isend_c(const void *buf, MPI_Count count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm,
int source_stream_index, int dest_stream_index,
MPI_Request *request)
Two flavors, bestie: the regular one and the _c one where count is an MPI_Count instead of an int π Copy them exactly, no cap.
π¦ INPUT PARAMETERS π¦
bufβ initial address of send buffer (choice). It's where your data lives, go get it π«Άcountβ number of elements in send buffer (non-negative integer). Gotta be zero or more, no negativity allowed βdatatypeβ datatype of each send buffer element (handle) π§destβ rank of destination (integer). Who's getting this lil message π¬tagβ message tag (integer) π·οΈcommβ communicator (handle) πsource_stream_indexβ source_stream_index (integer). Yes, it is literally named the same thing. That's the vibe, iykyk πdest_stream_indexβ dest_stream_index (integer). Same energy π
π OUTPUT PARAMETERS π
requestβ communication request (handle). Bestie, hold onto this one, you'll need it to check on your send later β¨
π THREAD AND INTERRUPT SAFETY π
So this routine is thread-safe. That means you can absolutely hit it from multiple threads at the same time with zero user-provided thread locks needed. Slay π₯
But β and this is the important part β it is not interrupt safe π Typically that's because of memory allocation routines like malloc or other non-MPICH runtime routines that are themselves not interrupt-safe. So like, thread-safe, yes. Interrupt-safe, no. Know the difference, it matters π«Ά
π NOTES FOR FORTRAN π
All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK) have an additional argument ierr at the end of the argument list. ierr is an integer and has the same meaning as the return value of the routine in C. In Fortran, MPI routines are subroutines, and they're invoked with the call statement π§
All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. Just INTEGER. That's it π
π 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 the value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job π³
The error handler may 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 β οΈ 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 π«Ά (they're trying their best, okay?)
Here's the full error menu:
MPI_SUCCESSβ No error; MPI routine completed successfully. We love to see it π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_BUFFERβ Invalid buffer pointer. Usually a null buffer where one is not valid. Bestie. Don't pass null where null isn't allowed πMPI_ERR_COMMβ Invalid communicator. A common error is to use a null communicator in a call (not even allowed inMPI_Comm_rank). Yeah, evenMPI_Comm_ranksaid no πMPI_ERR_COUNTβ Invalid count argument. Count arguments must be non-negative; a count of zero is often valid βMPI_ERR_RANKβ Invalid source or destination rank. Ranks must be between zero and the size of the communicator minus one; ranks in a receive (MPI_Recv,MPI_Irecv,MPI_Sendrecv, etc.) may also beMPI_ANY_SOURCE. So like, stay in bounds πMPI_ERR_TAGβ Invalid tag argument. Tags must be non-negative; tags in a receive (MPI_Recv,MPI_Irecv,MPI_Sendrecv, etc.) may also beMPI_ANY_TAG. The largest tag value is available through the the attributeMPI_TAG_UB. (Yes, "the the" β we keep it exactly as written, that's canon π«Ά)MPI_ERR_TYPEβ Invalid datatype argument. Additionally, this error can occur if an uncommittedMPI_Datatype(seeMPI_Type_commit) is used in a communication call. Commit your types first, bestie πΈMPI_ERR_OTHERβ Other error; useMPI_Error_stringto get more information about this error code. The catch-all, the "we'll figure it out" of error codes π
β οΈ fr fr remember: default error handler = aborts your whole MPI job. If you'd rather get a return value back, set MPI_ERRORS_RETURN. Choose wisely π
and that's the whole page, no skips, no summaries, every flag and every error code accounted for β¨
This was MPIX_Stream_isend(3), from the MPI manual, dated 4/10/2026 β and ngl, she ate π
π ππ¦π
periodt.
π¦ 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