This article was accepted into the corpus but its outbound wikilinks were never NER-processed — typical at the deepest BFS hop or when the run's entity cap was reached. No expansion funnel to show.
| MPI_Send | |
|---|---|
| Name | MPI_Send |
| Standard | MPI-1, MPI-2, MPI-3 |
| Family | Message Passing Interface |
| Type | Point-to-point communication routine |
| Language | C, Fortran, C++ |
| Introduced | 1994 |
| Typical use | Blocking send of a contiguous message |
MPI_Send
MPI_Send is the canonical blocking point-to-point send routine from the Message Passing Interface family standardized in the MPI-1, MPI-2, and MPI-3 specifications. It is widely implemented in libraries such as Open MPI, MPICH, and Intel MPI and used in high-performance computing centers like DOE national laboratories and university clusters to transfer data between processes in parallel applications. Implementations interact with system components including Linux, BSD, and Solaris kernels as well as interconnects from vendors such as Mellanox and Cray.
MPI_Send performs a blocking transfer of a message from one process to another within an MPI communicator like MPI_COMM_WORLD. In practice it coordinates with receive calls such as MPI_Recv and nonblocking operations like MPI_Isend and MPI_Irecv. Typical deployments include scientific codes running on systems overseen by organizations like CERN, NASA, and Oak Ridge National Laboratory and rely on message progression provided by runtime systems such as SLURM, PBS, and LSF.
C prototype: void MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Status *status) — note: implementations may return an int error code rather than void. Fortran and C++ bindings exist corresponding to language conventions and binding committees that have included contributors from IBM, Intel, and Microsoft. Parameters reference handles and types standardized by committees influenced by institutions like Argonne National Laboratory and the University of Tennessee. The dest and tag parameters are integers governed by limits defined in the MPI standard; communicators refer to contexts like MPI_COMM_WORLD or user-created communicators often produced by calls to MPI_Comm_split and MPI_Comm_dup.
Although MPI_Send is specified as a blocking send, the MPI standard allows different underlying transfer modes including eager and rendezvous protocols that relate to buffered and synchronous semantics. Buffered semantics can be achieved with MPI_Bsend after attaching a user buffer via MPI_Buffer_attach; synchronous behavior is provided by MPI_Ssend; and ready semantics are provided by MPI_Rsend when the receiver has already posted a matching receive. Implementors such as MPICH and Open MPI choose eager protocols for small messages and rendezvous for large transfers, decisions influenced by studies from research groups at universities like Stanford, MIT, and UC Berkeley and collaborations with vendors such as NVIDIA and Intel.
MPI_Send returns an error code in C and a status via language bindings; standard error handlers include MPI_ERRORS_RETURN and MPI_ERRORS_ARE_FATAL. Implementations map MPI errors to system-level error reporting used by batch systems like SLURM and job launchers such as OpenRTE. Errors can arise from invalid ranks, mismatched datatypes, tag or communicator errors, or resource exhaustion; diagnostic tools from HPC centers and vendors provide utilities to interpret stack traces and runtime logs when MPI calls fail.
Performance of MPI_Send depends on network topology, interconnects such as InfiniBand, Omni-Path, or Ethernet, memory hierarchy and NUMA effects on processors from AMD and Intel, and on runtime parameters like eager limits and rendezvous thresholds. Profilers such as TAU, HPCToolkit, and Intel VTune and tracing frameworks like Vampir and Score-P help analyze latency and bandwidth characteristics. Buffering strategies—user-buffered via MPI_Buffer_attach or library-managed eager buffers—affect copy avoidance and zero-copy paths provided by RDMA-capable hardware from Mellanox and Broadcom. Message coalescing, protocol tuning, and NIC offload capabilities are often tuned by system administrators at centers like Lawrence Livermore National Laboratory and the European Centre for Medium-Range Weather Forecasts.
C example (simplified): int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (rank == 0) { double data[100]; MPI_Send(data, 100, MPI_DOUBLE, 1, 0, MPI_COMM_WORLD); } if (rank == 1) { double recv[100]; MPI_Recv(recv, 100, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); }
Fortran and C++ snippets follow similar parameter conventions and are included in many MPI tutorials produced by institutions like NCSA, Argonne, and the HPC Advisory Council. Example usages appear in codebases from projects such as PETSc, Trilinos, and LAMMPS, and are taught in courses at universities like ETH Zurich, Imperial College London, and the Australian National University.
Implementations vary across MPICH, Open MPI, Intel MPI, Cray MPI, and vendor stacks for IBM Blue Gene and Fujitsu systems. Portability issues include differing default eager limits, thread-safety levels such as MPI_THREAD_SINGLE vs MPI_THREAD_MULTIPLE, and ABI compatibility across versions maintained by consortia like the MPI Forum. Interactions with compilers from GCC, Clang, and Intel compilers and language bindings for C, Fortran, and C++ can expose portability concerns in heterogeneous environments combining ARM, x86_64, and POWER processors. Best practices include consulting vendor documentation, MPI conformance tests from the MPI Test Suite, and configuring runtime parameters for consistent semantics across clusters maintained by national labs and research institutions.