# open-mpi/ompi architecture

> Architecture diagram of the GitHub repository open-mpi/ompi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/open-mpi/ompi
- Repository: https://github.com/open-mpi/ompi

## Overview

Open MPI is an implementation of the MPI specification. Its user-facing workflow is an application invoking MPI operations across processes; runtime launch and process-management support make those processes available, while communication and collective modules provide the library’s distributed behavior. The tree also includes MPI-IO, dynamic process management, and OSHMEM. Several connections below are dashed because the supplied excerpts do not show their runtime wiring; the graph does not infer calls merely from directory names.

Main entry points: [`ompi/communicator/comm.c`](https://github.com/open-mpi/ompi/blob/main/ompi/communicator/comm.c) (Communicators), [`ompi/mpi`](https://github.com/open-mpi/ompi/tree/main/ompi/mpi) (MPI operations), [`ompi/mca/pml`](https://github.com/open-mpi/ompi/tree/main/ompi/mca/pml) (Point-to-point), [`ompi/mca/io`](https://github.com/open-mpi/ompi/tree/main/ompi/mca/io) (MPI-IO)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["MPI Core"]
  node_mpi_api["MPI operations"]
  node_errhandlers["Error handlers<br/>[errhandler.c]"]
  node_datatypes["MPI datatypes"]
  node_oshmem["OSHMEM"]
end

subgraph group_comm["Process Coordination"]
  node_communicator["Communicators<br/>[comm.c]"]
  node_processes["Process registry"]
  node_groups["Process groups"]
  node_dynamic["Dynamic processes<br/>[dpm.c]"]
end

subgraph group_messaging["Communication"]
  node_collectives["Collectives"]
  node_pml["Point-to-point"]
  node_ob1_receive["OB1 receive<br/>[pml_ob1_recvfrag.c]"]
  node_transport["Transport modules"]
end

subgraph group_io["Parallel I/O"]
  node_io["MPI-IO"]
  node_file_system["Filesystem modules"]
  node_file_collectives["Collective I/O"]
end

subgraph group_runtime["Runtime Support"]
  node_launcher["mpirun<br/>[main.c]"]
  node_prterun["PRRTE launcher"]
  node_pmix["PMIx support<br/>[pmix-internal.h]"]
  node_opal_core["OPAL foundations"]
  node_mca_repository["MCA component repository"]
end

node_application(("MPI application"))

node_application -.->|"invokes"| node_mpi_api
node_mpi_api -.->|"uses"| node_communicator
node_mpi_api -.->|"uses"| node_datatypes
node_mpi_api -.->|"dispatches"| node_collectives
node_mpi_api -.->|"dispatches"| node_pml
node_mpi_api -.->|"dispatches"| node_io
node_communicator -->|"references"| node_processes
node_communicator -->|"uses"| node_groups
node_communicator -->|"uses"| node_dynamic
node_errhandlers -->|"handles errors"| node_communicator
node_ob1_receive -->|"checks matches"| node_communicator
node_pml -.->|"implements receive"| node_ob1_receive
node_pml -.->|"uses transport"| node_transport
node_io -.->|"uses filesystem"| node_file_system
node_io -.->|"uses collective I/O"| node_file_collectives
node_launcher -->|"executes"| node_prterun
node_communicator -->|"uses process services"| node_pmix
node_mca_repository -->|"uses foundations"| node_opal_core
node_launcher -->|"initializes utilities"| node_opal_core

click node_mpi_api "https://github.com/open-mpi/ompi/tree/main/ompi/mpi"
click node_communicator "https://github.com/open-mpi/ompi/blob/main/ompi/communicator/comm.c"
click node_processes "https://github.com/open-mpi/ompi/tree/main/ompi/proc"
click node_groups "https://github.com/open-mpi/ompi/tree/main/ompi/group"
click node_dynamic "https://github.com/open-mpi/ompi/blob/main/ompi/dpm/dpm.c"
click node_errhandlers "https://github.com/open-mpi/ompi/blob/main/ompi/errhandler/errhandler.c"
click node_datatypes "https://github.com/open-mpi/ompi/tree/main/ompi/datatype"
click node_collectives "https://github.com/open-mpi/ompi/tree/main/ompi/mca/coll"
click node_pml "https://github.com/open-mpi/ompi/tree/main/ompi/mca/pml"
click node_ob1_receive "https://github.com/open-mpi/ompi/blob/main/ompi/mca/pml/ob1/pml_ob1_recvfrag.c"
click node_transport "https://github.com/open-mpi/ompi/tree/main/opal/mca/btl"
click node_io "https://github.com/open-mpi/ompi/tree/main/ompi/mca/io"
click node_file_system "https://github.com/open-mpi/ompi/tree/main/ompi/mca/fs"
click node_file_collectives "https://github.com/open-mpi/ompi/tree/main/ompi/mca/fcoll"
click node_launcher "https://github.com/open-mpi/ompi/blob/main/ompi/tools/mpirun/main.c"
click node_pmix "https://github.com/open-mpi/ompi/blob/main/opal/mca/pmix/pmix-internal.h"
click node_opal_core "https://github.com/open-mpi/ompi/tree/main/opal"
click node_oshmem "https://github.com/open-mpi/ompi/tree/main/oshmem"
click node_mca_repository "https://github.com/open-mpi/ompi/blob/main/opal/mca/base/mca_base_component_repository.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mpi_api,node_errhandlers,node_datatypes,node_oshmem toneBlue
class node_communicator,node_processes,node_groups,node_dynamic toneAmber
class node_collectives,node_pml,node_ob1_receive,node_transport toneMint
class node_io,node_file_system,node_file_collectives toneRose
class node_launcher,node_prterun,node_pmix,node_opal_core,node_mca_repository,node_application toneIndigo
```

## Components

### MPI Core

- [MPI operations](https://github.com/open-mpi/ompi/tree/main/ompi/mpi): `ompi/mpi`
- [Error handlers](https://github.com/open-mpi/ompi/blob/main/ompi/errhandler/errhandler.c): `ompi/errhandler/errhandler.c`
- [MPI datatypes](https://github.com/open-mpi/ompi/tree/main/ompi/datatype): `ompi/datatype`
- [OSHMEM](https://github.com/open-mpi/ompi/tree/main/oshmem): `oshmem`

### Process Coordination

- [Communicators](https://github.com/open-mpi/ompi/blob/main/ompi/communicator/comm.c): `ompi/communicator/comm.c`
- [Process registry](https://github.com/open-mpi/ompi/tree/main/ompi/proc): `ompi/proc`
- [Process groups](https://github.com/open-mpi/ompi/tree/main/ompi/group): `ompi/group`
- [Dynamic processes](https://github.com/open-mpi/ompi/blob/main/ompi/dpm/dpm.c): `ompi/dpm/dpm.c`

### Communication

- [Collectives](https://github.com/open-mpi/ompi/tree/main/ompi/mca/coll): `ompi/mca/coll`
- [Point-to-point](https://github.com/open-mpi/ompi/tree/main/ompi/mca/pml): `ompi/mca/pml`
- [OB1 receive](https://github.com/open-mpi/ompi/blob/main/ompi/mca/pml/ob1/pml_ob1_recvfrag.c): `ompi/mca/pml/ob1/pml_ob1_recvfrag.c`
- [Transport modules](https://github.com/open-mpi/ompi/tree/main/opal/mca/btl): `opal/mca/btl`

### Parallel I/O

- [MPI-IO](https://github.com/open-mpi/ompi/tree/main/ompi/mca/io): `ompi/mca/io`
- [Filesystem modules](https://github.com/open-mpi/ompi/tree/main/ompi/mca/fs): `ompi/mca/fs`
- [Collective I/O](https://github.com/open-mpi/ompi/tree/main/ompi/mca/fcoll): `ompi/mca/fcoll`

### Runtime Support

- [mpirun](https://github.com/open-mpi/ompi/blob/main/ompi/tools/mpirun/main.c): `ompi/tools/mpirun/main.c`
- **PRRTE launcher**
- [PMIx support](https://github.com/open-mpi/ompi/blob/main/opal/mca/pmix/pmix-internal.h): `opal/mca/pmix/pmix-internal.h`
- [OPAL foundations](https://github.com/open-mpi/ompi/tree/main/opal): `opal`
- [MCA component repository](https://github.com/open-mpi/ompi/blob/main/opal/mca/base/mca_base_component_repository.c): `opal/mca/base/mca_base_component_repository.c`

### Other components

- **MPI application**

## Connections

- MPI application → MPI operations: invokes
- MPI operations → Communicators: uses
- MPI operations → MPI datatypes: uses
- MPI operations → Collectives: dispatches
- MPI operations → Point-to-point: dispatches
- MPI operations → MPI-IO: dispatches
- Communicators → Process registry: references (evidence: `ompi/communicator/comm.c`)
- Communicators → Process groups: uses (evidence: `ompi/communicator/comm.c`)
- Communicators → Dynamic processes: uses (evidence: `ompi/communicator/comm.c`)
- Error handlers → Communicators: handles errors (evidence: `ompi/errhandler/errhandler.c`)
- OB1 receive → Communicators: checks matches (evidence: `ompi/mca/pml/ob1/pml_ob1_recvfrag.c`)
- Point-to-point → OB1 receive: implements receive (evidence: `ompi/mca/pml/ob1/pml_ob1_recvfrag.c`)
- Point-to-point → Transport modules: uses transport
- MPI-IO → Filesystem modules: uses filesystem
- MPI-IO → Collective I/O: uses collective I/O
- mpirun → PRRTE launcher: executes (evidence: `ompi/tools/mpirun/main.c`)
- Communicators → PMIx support: uses process services (evidence: `ompi/communicator/comm.c`)
- MCA component repository → OPAL foundations: uses foundations (evidence: `opal/mca/base/mca_base_component_repository.c`)
- mpirun → OPAL foundations: initializes utilities (evidence: `ompi/tools/mpirun/main.c`)
