Open MPI Documentation

repository·main·Indexed 25 days ago

https://github.com/open-mpi/ompi

An open-source implementation of the Message Passing Interface (MPI) specification for High Performance Computing (HPC). Documentation covers building third-party MCA components, communication monitoring via pml_monitoring_enable, XPMEM Hierarchical Collectives (XHC), and detailed configuration for the OFI MTL provider, including Scalable Endpoints (SEP) and compile-time function specialization.

Tokens
260.7K
Snippets
335
Records
1.5K
Agent score
83%

What's inside Open MPI

  1. Overview of MEMHEAP Infrastructure

    main

    The MEMHEAP infrastructure is responsible for managing the symmetric heap in OpenSHMEM. It provides a framework for memory allocation on the symmetric heap through different components.

    Currently supported components include:

    • buddy: Uses a buddy allocator to manage memory allocations on the symmetric heap.
    • ptmalloc: An adaptation of ptmalloc3.

    The infrastructure automatically selects the component with the highest priority during initialization.

  2. Introduction to the OpenSHMEM Programming Model

    main

    OpenSHMEM provides a low-latency, high-bandwidth communication API for highly parallelized scalable programs. It follows a Single Program, Multiple Data (SPMD) style where multiple processes, called Processing Elements (PEs), run the same program simultaneously.

    Key capabilities include:

    • Remote Data Transfer: Using put operations (to send data to a remote PE), get operations (to retrieve data from a remote PE), and remote pointers.
    • Collective Operations: Broadcast, reduction, and barrier synchronization.
    • Atomic Memory Operations: Atomic read-and-update operations (e.g., fetch-and-increment) on local or remote data objects.

    The SHMEM API can be used independently or in combination with MPI routines within the same parallel program.

  3. Overview of BTL/OFI (RDMA via Libfabric)

    main

    The BTL/OFI component is an RDMA-only Byte Transfer Layer (BTL) based on the Libfabric (OFI) API. Its primary purpose is to enable RDMA across multiple vendor hardware through a single interface. Most high-level operations are managed by the upper layers (osc/rdma), while this BTL handles low-level communication tasks.

    Tested providers include:

    • sockets (Proof of Concept, slow, potentially unstable)
    • psm2 (High performance)
  4. Overview of supported and deprecated fault tolerance techniques

    main

    Open MPI's support for fault tolerance is categorized as follows:

    Currently Supported

    • User Level Fault Mitigation (ULFM): The primary supported technique for resilience.

    Research / Non-Production Only

    • Message logging techniques: Similar to MPICH-V implementations.

    Deprecated / No Longer Available

    • Coordinated and uncoordinated process checkpoint and restart: (Formerly similar to LAM/MPI and MPICH-V).
    • Data Reliability and network fault tolerance: (Formerly similar to LA-MPI).
  5. Overview of Parallel Debugging Tools

    main

    Parallel debugging in Open MPI can be approached using two main categories of tools:

    1. Debuggers:

      • Serial Debuggers: Standard debuggers like gdb that operate on individual processes.
      • Parallel Debuggers: Tools that attach to all individual processes in an MPI job simultaneously. They treat the entire MPI application as a single entity, allowing for control over the whole job, manual replication of race conditions, and other high-level abstractions.
    2. Profilers:

      • Tools that analyze MPI usage and provide statistics and meta-information about the application run.
      • Live Profilers: Present information as the application runs.
      • Post-mortem Profilers: Collect information during the run for analysis after the application has finished.
  6. Open MPI runtime environment (PRRTE)

    main
    Open MPI uses the PMIx Reference Runtime Environment (PRRTE) as its engine for launching, monitoring, and terminating MPI processes. mpirun acts as a wrapper around prterun. Many command-line options and concepts are inherited from PRRTE, though Open MPI extends these options and may modify some default behaviors.
  7. Understand the role of PMIx and PRRTE in Open MPI

    main

    Open MPI utilizes two external packages, PMIx and PRRTE, to handle its run-time system support. While Open MPI provides a unified interface that translates configuration directives to these packages automatically, understanding their roles can help advanced users:

    • PMIx (Process Management Interface Exascale): Used for the management, communication, and coordination of MPI processes with a back-end run-time system (e.g., ssh, Slurm, PBS/Pro/Torque, or LSF). It provides a unified API that abstracts the complexities of different back-end environments.
    • PRRTE (PMIx Reference Run-Time Environment): Acts as the reference run-time environment that utilizes the PMIx API. It provides infrastructure for environments lacking native distributed scheduling, such as those relying solely on ssh. Open MPI uses PRRTE to handle practical tasks like launching, monitoring, killing, and reaping remote processes.
  8. Understand the Modular Component Architecture (MCA)

    main
    The Modular Component Architecture (MCA) is the core framework of Open MPI. Most services and functionalities are implemented as MCA components. These components are organized into various frameworks depending on their purpose (e.g., MPI layer, OpenSHMEM, or miscellaneous services). Components within these frameworks are typically selected and used at run-time.
  9. Understand Open MPI Project Dependencies

    main

    Open MPI is organized into distinct projects that act as abstraction barriers. These projects are compiled into separate libraries with a specific dependency order. When linking MPI executables, you typically link against libmpi, which implicitly pulls in its dependencies like libopen-pal.

    Dependency Order:

    1. OSHMEM depends on OMPI
    2. OMPI depends on OPAL

    Note that while these are organized by dependency, they are not strict functional layers; for performance reasons, higher-level code (like OMPI) may call the operating system or network interfaces directly without traversing the lower-level libraries.

  10. Understand MPI launch environments

    main

    MPI processes in Open MPI can be launched in two main types of environments:

    1. Scheduled environments: Systems that use a resource manager or scheduler to control access to compute nodes (e.g., Slurm, PBS/Pro/Torque, and LSF).
    2. Non-scheduled environments: Systems without a resource manager. These are typically local launches (e.g., on a single workstation) or launches across a small number of nodes via ssh.
  11. Understand USNIC BTL Data Structures and Nomenclature

    main

    The USNIC BTL (Byte Transfer Layer) uses specific terminology to manage data movement:

    • fragment: The unit of data requested by the PML (Point-to-Point Management Layer) to be sent or put, of any size.
    • segment: A unit of data that can be placed on the wire in a single packet.
    • chunk: A piece of a fragment that fits into exactly one segment.

    Fragment Types:

    • Small fragments (<= MTU): Have a segment descriptor embedded within them.
    • Large fragments (> MTU): Do not have permanently associated segments; they allocate segments as needed. Segments for large fragments include a BTL header containing a fragment ID, offset, and size.

    Channel Types:

    • Command queue: A high-priority, short queue with a small MTU. It is used for ACKs and 'tiny' fragments (currently $\le$ 768 bytes).
    • Data queue: Used for standard data traffic and all fragments larger than the tiny MTU.