MPI_Issend(3)
π MPI_Issend β bestie edition
okay so welcome to the MPI_Issend(3) page, straight out of the MPI manual, and honestly? this one's a bop. pour ur matcha π΅ and let's get into it.
β¨ NAME β¨
MPI_Issend β starts a nonblocking synchronous send. yes bestie, that's a lot of adjectives. nonblocking AND synchronous. it's giving "I sent it but I didn't wait around for a reply." main character energy fr.
π SYNOPSIS π
int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest,
int tag, MPI_Comm comm, MPI_Request *request)
int MPI_Issend_c(const void *buf, MPI_Count count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm, MPI_Request *request)
two versions, bestie. MPI_Issend is the classic one, and MPI_Issend_c is literally the same thing except count is an MPI_Count instead of an int. so if ur counting something big big, that's ur girl π
π«Ά INPUT PARAMETERS π«Ά
the stuff u gotta hand over. no cap, all of these matter.
bufβ initial address of send buffer (choice). it's where ur actual data lives, the lil home of ur message πcountβ number of elements in send buffer (non-negative integer). how many lil guys are u sending. keep it non-negative pls, she's sensitive about that.datatypeβ datatype of each send buffer element (handle). so like, what kind of thing each element is πdestβ rank of destination (integer). who's getting this. the lucky rank πtagβ message tag (integer). ur lil label so the receiver knows what's up π·οΈcommβ communicator (handle). the group chat, basically. the gc β¨
π OUTPUT PARAMETERS π
requestβ communication request (handle). this is ur lil receipt, ur "hey I've got a pending send happening, check back later." hold onto it, bestie, u need it for the wait/test calls π§Ύ
π₯ THREAD AND INTERRUPT SAFETY π₯
this routine is thread-safe, okay?? that means multiple threads can use it at the same time and u do not need to bring ur own user-provided thread locks. she's independent, she's self-sufficient, she doesn't need u hovering π β¨
BUT. and this is the important but π¨ β the routine is not interrupt safe. typically this is 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 bestie, it's giving nuance.
π§ NOTES FOR FORTRAN π§
Fortran girlies, this section is for u πΈ
all MPI routines in Fortran β except for MPI_WTIME and MPI_WTICK β have an additional 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. so no new concepts, just a different delivery system π
also, in Fortran, MPI routines are subroutines, and u invoke them with the call statement.
and one more: all MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. periodt.
π ERRORS π
okay bestie, listen up, this is where the drama lives. all MPI routines (except MPI_Wtime and MPI_Wtick) return an error value β C routines as the value of the function itself, and Fortran routines as that last argument we were just talking about.
and before the value is returned, the current MPI error handler gets called. by default? this error handler aborts the MPI job. π like, whole program, gone, bye. u can change the error handler 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 β so like, it exists, but don't be that girl π
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 sometimes she pulls through, sometimes she doesn't. no promises π€·ββοΈ
here's ur error roster:
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 why is there no buffer πMPI_ERR_COMMβ Invalid communicator. A common error is to use a null communicator in a call (not even allowed inMPI_Comm_rank). that's rough even for the simplest call smh.MPI_ERR_COUNTβ Invalid count argument. Count arguments must be non-negative; a count of zero is often valid. so zero? fine. negative? absolutely not π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.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 original says "the the." we are preserving the lore. π)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 ur types, bestie, don't leave her hanging π₯ΊMPI_ERR_OTHERβ Other error; useMPI_Error_stringto get more information about this error code. the catch-all. the "idk what happened either" β¨
quick vibe check: nonblocking = u get a request back and u deal with it later. synchronous = it's not "done" until the matching receive has started. both at once = ur multitasking queen π
and that's the whole page, bestie!! π¦ this lil masterpiece is from the MPI manual, dated 4/10/2026, and yes, the page itself is titled MPI_Issend(3) β so now u know exactly what to type when u need her again. go send something nonblockingly synchronously, u absolute icon πβ¨π
π¦ 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