Computing Library › HPC & Compute
HPC & Compute

One-Sided (RMA) Communication

One-sided communication lets a process read or write a remote process's memory directly, without the remote process issuing a matching call.

Two-sided versus one-sided

Classic MPI send/receive is two-sided: a send must be matched by a receive, and both processes are active participants. One-sided communication, also called Remote Memory Access (RMA), decouples them. The origin process issues MPI_Put, MPI_Get, or MPI_Accumulate to move data into or out of a window of memory the target has exposed, and the target need not call anything at the moment of transfer.

Windows and epochs

Kronos motion — remote op

A process exposes memory by creating an MPI window with MPI_Win_create or MPI_Win_allocate. Access is organized into epochs delimited by synchronization calls. In active-target mode, MPI_Win_fence brackets a bulk phase of puts and gets. In passive-target mode, MPI_Win_lock and MPI_Win_unlock let one process operate on another's window with no involvement from the target at all, which is the model closest to shared memory.

Why use it

One-sided fits irregular and dynamic access patterns where a process does not know in advance which peers will need its data, such as unstructured mesh updates, distributed hash tables, and graph algorithms. It maps directly onto RDMA-capable hardware (InfiniBand, RoCE), letting the network interface move data without interrupting the remote CPU, which can reduce latency and free cores for computation.

The cost of the model

RMA is powerful but sharp-edged. Memory consistency is subtle: without the correct synchronization, a get may return stale data or a put may not be visible. Programmers must reason about completion at both the origin and the target. Used carefully, one-sided communication expresses patterns that are awkward or slow in two-sided MPI; used carelessly, it produces races that are hard to reproduce. It underlies many PGAS languages and libraries built on top of MPI.