MPIX_Stream_isend(3)

πŸ“¦
version 5.0.1 Β· 4 versions
, in nixos 26.05, ubuntu stonking

πŸ’« 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 in MPI_Comm_rank). Yeah, even MPI_Comm_rank said 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 be MPI_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 be MPI_ANY_TAG. The largest tag value is available through the the attribute MPI_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 uncommitted MPI_Datatype (see MPI_Type_commit) is used in a communication call. Commit your types first, bestie 🌸
  • MPI_ERR_OTHER β€” Other error; use MPI_Error_string to 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