Home Knowledge Base MPI One-Sided Communication (RMA)

MPI One-Sided Communication (RMA) is the MPI paradigm where a single process can directly read from (Get) or write to (Put) memory on a remote process without the remote process explicitly participating in the communication, enabling asynchronous data transfer patterns that can overlap computation with communication and simplify irregular communication structures.

Traditional MPI two-sided communication (Send/Recv) requires both sender and receiver to participate: the receiver must post a matching Recv before or concurrently with the sender's Send. This synchronization requirement creates challenges for irregular access patterns (where the target of each communication is data-dependent) and limits overlap opportunities.

MPI RMA Operations:

OperationSemanticsUse Case
MPI_PutWrite local data to remote windowDistributed array updates
MPI_GetRead remote window data to local bufferIrregular data gathering
MPI_AccumulateRemote atomic read-modify-writeDistributed reduction
MPI_Get_accumulateAtomic get + accumulateCompare-and-swap patterns
MPI_Compare_and_swapAtomic CAS on remote memoryDistributed locks
MPI_Fetch_and_opAtomic fetch + operationCounters, queues

Window Creation: Before RMA operations, each process exposes a memory region as an MPI Window. Window types include: MPI_Win_create (existing buffer), MPI_Win_allocate (MPI allocates optimized memory), MPI_Win_allocate_shared (shared memory in same node), and MPI_Win_create_dynamic (attach/detach memory regions dynamically).

Synchronization Modes: RMA operations are non-blocking — completion must be ensured through synchronization:

Performance Considerations: One-sided communication can exploit RDMA hardware (InfiniBand, iWARP) that performs remote memory access without remote CPU involvement. Key factors: latency — Put/Get can be lower latency than Send/Recv for small messages; overlap — non-blocking RMA enables computation during transfer; contention — concurrent access to same window region requires careful synchronization; progress — some MPI implementations require periodic MPI calls for background RMA progress.

Use Cases: Distributed hash tables (remote Get for lookups), stencil computations with one-sided halo exchange, distributed graph algorithms with irregular access, global arrays (GA/PGAS implemented over MPI RMA), and distributed shared-memory emulation.

MPI one-sided communication bridges the gap between message-passing and shared-memory programming models — providing the performance of RDMA-capable hardware with the portability and standardization of MPI, enabling efficient irregular communication patterns that are awkward with two-sided messaging.

mpi one sided communicationmpi rmampi put getremote memory access mpi

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.