MPI_Ineighbor_alltoallv(3)

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

πŸ’– MPI_Ineighbor_alltoallv(3) πŸ’–

okay so bestie, welcome to the MPI manual page for MPI_Ineighbor_alltoallv and honestly? she's a whole vibe. it's the nonblocking version of MPI_Neighbor_alltoallv β€” like, the same energy, but she does NOT wait around for you to finish. no cap.


🌸 NAME 🌸

MPI_Ineighbor_alltoallv β€” the nonblocking version of MPI_Neighbor_alltoallv. πŸ¦‹


✨ SYNOPSIS ✨

int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[],
const int sdispls[], MPI_Datatype sendtype,
void *recvbuf, const int recvcounts[],
const int rdispls[], MPI_Datatype recvtype,
MPI_Comm comm, MPI_Request *request)

int MPI_Ineighbor_alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[],
const MPI_Aint sdispls[], MPI_Datatype sendtype,
void *recvbuf, const MPI_Count recvcounts[],
const MPI_Aint rdispls[], MPI_Datatype recvtype,
MPI_Comm comm, MPI_Request *request)

like yes, there's a _c variant too. she's the same girl with the fancy MPI_Count and MPI_Aint types, and we love that for her. πŸ’…


πŸ‘‘ INPUT PARAMETERS πŸ‘‘

  • sendbuf β€” starting address of send buffer (choice). it's giving "here's where my data lives."
  • sendcounts β€” non-negative integer array (of length outdegree) specifying the number of elements to send to each neighbor (non-negative integer). so, one count per neighbor you're sending to. πŸ’–
  • sdispls β€” integer array (of length outdegree). Entry j specifies the displacement (relative to sendbuf) from which send the outgoing data to neighbor j (integer). basically the lil map that says "neighbor j, your stuff starts over here." πŸŽ€
  • sendtype β€” data type of send buffer elements (handle).
  • recvcounts β€” non-negative integer array (of length indegree) specifying the number of elements that are received from each neighbor (non-negative integer).
  • rdispls β€” integer array (of length indegree). Entry i specifies the displacement (relative to recvbuf) at which to place the incoming data from neighbor i (integer).
  • recvtype β€” data type of receive buffer elements (handle).
  • comm β€” communicator with topology structure (handle). πŸ‘‘

🫢 OUTPUT PARAMETERS 🫢

  • recvbuf β€” starting address of receive buffer (choice).
  • request β€” communication request (handle). this is your ticket to later check on her, bestie. hold onto it. ✨

πŸ”₯ THREAD AND INTERRUPT SAFETY πŸ”₯

okay so this routine is thread-safe. that means you can literally have multiple threads running it at the same time without needing any user-provided thread locks. slay. 😌

BUT β€” and this is the important part, ngl β€” she is not interrupt safe. typically that's because of memory allocation routines like malloc or other non-MPICH runtime routines that themselves aren't interrupt-safe. so like. know that. πŸ’€


🌈 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 (like, e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. iconic behavior honestly. πŸ’œ


😭 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 β€” like, it's still there but bestie, don't. 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.

fr fr: default handler = the whole job just aborts. if you want error values back instead, that's what MPI_ERRORS_RETURN is for.
  • MPI_SUCCESS β€” No error; MPI routine completed successfully. πŸŽ‰
  • 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 error is to use a null communicator in a call (not even allowed in MPI_Comm_rank).
  • MPI_ERR_COUNT β€” Invalid count argument. Count arguments must be non-negative; a count of zero is often valid.
  • 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.
  • MPI_ERR_OTHER β€” Other error; use MPI_Error_string to get more information about this error code.

and that's the whole page, bestie!! 🧚 this lil transmission came to you from the MPI source, dated 4/10/2026, filed under MPI_Ineighbor_alltoallv(3). go be a main character in your own communicator. β­πŸ’–

πŸ“¦ where this page comes from