MPI_Ineighbor_allgather(3)
π MPI_Ineighbor_allgather(3) π
okay bestie so this is the MPI manual page for MPI_Ineighbor_allgather, and it is literally the nonblocking glow-up of MPI_Neighbor_allgather. same vibe, but it doesn't make you wait around for it β it hands you back a request and lets you get on with your life. iconic behavior honestly.
β¨ NAME β¨
MPI_Ineighbor_allgather β the nonblocking version of MPI_Neighbor_allgather. that's it, that's the name, and it ate.
β¨ SYNOPSIS β¨
int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount,
MPI_Datatype sendtype, void *recvbuf, int recvcount,
MPI_Datatype recvtype, MPI_Comm comm,
MPI_Request *request)
int MPI_Ineighbor_allgather_c(const void *sendbuf, MPI_Count sendcount,
MPI_Datatype sendtype, void *recvbuf,
MPI_Count recvcount, MPI_Datatype recvtype,
MPI_Comm comm, MPI_Request *request)
two flavors, same energy π
β the classic one and the _c one that takes MPI_Count for the counts, iykyk.
β¨ INPUT PARAMETERS β¨
sendbufβ starting address of send buffer (choice). where the stuff you're sending lives. π«Άsendcountβ number of elements sent to each neighbor (non-negative integer). not to all of them combined, bestie β to each one. read it carefully.sendtypeβ data type of send buffer elements (handle).recvcountβ number of elements received from each neighbor (non-negative integer). again: each. πrecvtypeβ data type of receive buffer elements (handle).commβ communicator with topology structure (handle). it needs the topology one, okay? not just any random comm, it's giving "must have structure."
β¨ OUTPUT PARAMETERS β¨
recvbufβ starting address of receive buffer (choice).requestβ communication request (handle). hold onto this one, you're gonna need it later to check in on things. π
β¨ THREAD AND INTERRUPT SAFETY β¨
this routine is thread-safe. translating: multiple threads can use it at the same time, no cap, and you don't have to write your own thread locks to keep it from falling apart. slay.
but β and this is the plot twist π β it is not interrupt safe. typically that's because of memory allocation routines like malloc, or other non-MPICH runtime routines, which are themselves not interrupt-safe. so like, threads? fine. interrupts? girl, no.
β¨ NOTES FOR FORTRAN β¨
okay Fortran besties, gather round π
- every MPI routine in Fortran (except
MPI_WTIMEandMPI_WTICK) has an extra argumentierrtacked on at the end of the argument list. it's an integer and it means exactly the same thing as the return value of the routine in C. - in Fortran, MPI routines are subroutines, and you invoke them with the
callstatement. periodt. - all MPI objects (like
MPI_Datatype,MPI_Comm) are of typeINTEGERin Fortran. π
β¨ ERRORS β¨
every MPI routine (again, except MPI_Wtime and MPI_Wtick) returns an error value β C routines as the value of the function, Fortran routines in that last argument. before that value comes back to you, the current MPI error handler gets called. by default, that handler aborts the whole MPI job. yes, really. dramatic? maybe. accurate? yes. π
you can change the error handler with:
MPI_Comm_set_errhandlerβ for communicatorsMPI_File_set_errhandlerβ for filesMPI_Win_set_errhandlerβ for RMA windows
the MPI-1 routine MPI_Errhandler_set may be used, but heads up: its use is deprecated. lowkey don't.
the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned instead. and ngl, 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 π€
the error codes themselves:
MPI_SUCCESSβ no error; MPI routine completed successfully. the dream. β¨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. πMPI_ERR_COMMβ invalid communicator. a common one is passing a null communicator in a call (not even allowed inMPI_Comm_rank).MPI_ERR_COUNTβ invalid count argument. count arguments must be non-negative; a count of zero is often valid. note the "often," bestie.MPI_ERR_TYPEβ invalid datatype argument. additionally, this can happen if an uncommittedMPI_Datatype(seeMPI_Type_commit) is used in a communication call.MPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code.
everything listed here is exactly what the page says. no invented lore, no made-up flags. I keep the facts, I just make them cute. π§
k that's the whole page babes, go forth and be nonblocking about it ππΈ
β this was MPI_Ineighbor_allgather(3) from the MPI manual, dated 4/10/2026. mwah, see u next man page πβ¨
π¦ 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