hpc-mpi

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

HPC MPI

HPC MPI

Treat MPI as a three-layer surface: implementation choice, build or wrapper semantics, and launcher behavior inside the target scheduler.
将MPI视为三层架构:实现选择、构建或包装器语义,以及目标调度器内的启动器行为。

Start

开始

  1. Read
    references/mpi-implementation-matrix.md
    before choosing or repairing an MPI stack.
  2. Read
    references/launcher-semantics.md
    when deciding between
    srun
    ,
    mpirun
    ,
    mpiexec
    , Hydra, or a site wrapper.
  3. Read
    references/wrapper-compilers-and-build.md
    when compiling with
    mpicc
    or
    mpicxx
    or
    mpifort
    , linking dependencies, or mixing MPI and non-MPI toolchains.
  4. Read
    references/rank-thread-binding-matrix.md
    when selecting MPI rank counts, OpenMP threads, affinity, or NUMA placement.
  5. Read
    references/pmi-pmix-and-environment-propagation.md
    when PMI or PMIx integration, environment forwarding, or batch-shell drift is in doubt.
  6. Read
    references/scheduler-integration-playbook.md
    when launching under Slurm, PBS, or LSF.
  7. Read
    references/runtime-debugging-and-observability.md
    when ranks hang, crash, oversubscribe, or report inconsistent environment state.
  8. Read
    references/error-pattern-dictionary.md
    when an MPI build or runtime failure needs a fast pattern match.
  1. 在选择或修复MPI栈之前,请阅读
    references/mpi-implementation-matrix.md
  2. 在决定使用
    srun
    mpirun
    mpiexec
    、Hydra或站点包装器时,请阅读
    references/launcher-semantics.md
  3. 使用
    mpicc
    mpicxx
    mpifort
    编译、链接依赖项,或混合MPI与非MPI工具链时,请阅读
    references/wrapper-compilers-and-build.md
  4. 选择MPI进程数、OpenMP线程、亲和性或NUMA布局时,请阅读
    references/rank-thread-binding-matrix.md
  5. 对PMI或PMIx集成、环境转发或批处理shell漂移存在疑问时,请阅读
    references/pmi-pmix-and-environment-propagation.md
  6. 在Slurm、PBS或LSF下启动应用时,请阅读
    references/scheduler-integration-playbook.md
  7. 当进程挂起、崩溃、过度订阅或报告不一致的环境状态时,请阅读
    references/runtime-debugging-and-observability.md
  8. 当需要快速匹配MPI构建或运行时故障模式时,请阅读
    references/error-pattern-dictionary.md

Work sequence

工作流程

  1. Identify the active MPI family first:
    • Open MPI
    • MPICH or Hydra-derived stack
    • Intel MPI
    • MVAPICH2
    • site-specific wrapper around one of those families
  2. Keep compiler wrappers and runtime launcher from the same stack.
  3. Decide whether the scheduler should launch ranks directly or whether the MPI launcher should do it.
  4. Make rank count, CPUs per rank,
    OMP_NUM_THREADS
    , and binding policy mutually consistent.
  5. Reproduce failures on the smallest rank count that still shows the issue before scaling back out.
  1. 首先确定当前使用的MPI系列:
    • Open MPI
    • MPICH或基于Hydra的栈
    • Intel MPI
    • MVAPICH2
    • 基于上述系列之一的站点特定包装器
  2. 确保编译器包装器和运行时启动器来自同一栈。
  3. 决定是由调度器直接启动进程,还是由MPI启动器来执行。
  4. 确保进程数、每个进程的CPU数、
    OMP_NUM_THREADS
    以及绑定策略保持一致。
  5. 在扩展到大规模之前,先在能复现问题的最小进程数环境中排查故障。

Guardrails

注意事项

  • Do not mix
    mpicc
    from one MPI stack with
    mpirun
    from another.
  • Do not assume
    mpirun
    and
    srun
    are interchangeable on a managed cluster.
  • Do not tune binding or transport variables before confirming the rank geometry is coherent.
  • Do not debug collectives or hangs at production scale first when a two-rank or four-rank reproduction is possible.
  • 不要混合使用来自不同MPI栈的
    mpicc
    mpirun
  • 不要假设在受管集群上
    mpirun
    srun
    可以互换使用。
  • 在确认进程拓扑一致之前,不要调整绑定或传输变量。
  • 当可以用2个或4个进程复现问题时,不要首先在生产规模下调试集合操作或挂起问题。

Additional References

额外参考资料

Load these on demand:
  • references/mpi-implementation-matrix.md
    for family selection and compatibility boundaries
  • references/launcher-semantics.md
    for launcher-specific expectations and scheduler handoff
  • references/wrapper-compilers-and-build.md
    for compiler-wrapper usage and link hygiene
  • references/rank-thread-binding-matrix.md
    for affinity and hybrid MPI plus OpenMP choices
  • references/pmi-pmix-and-environment-propagation.md
    for scheduler handoff, PMI or PMIx expectations, and batch-shell environment propagation
  • references/scheduler-integration-playbook.md
    for Slurm or PBS or LSF integration detail
  • references/runtime-debugging-and-observability.md
    for hang triage, rank-local logging, and environment inspection
  • references/error-pattern-dictionary.md
    for common MPI failure signatures
按需加载以下内容:
  • references/mpi-implementation-matrix.md
    :用于系列选择和兼容性边界
  • references/launcher-semantics.md
    :用于启动器特定预期和调度器交接
  • references/wrapper-compilers-and-build.md
    :用于编译器包装器使用和链接规范
  • references/rank-thread-binding-matrix.md
    :用于亲和性以及MPI与OpenMP混合选择
  • references/pmi-pmix-and-environment-propagation.md
    :用于调度器交接、PMI或PMIx预期以及批处理shell环境传播
  • references/scheduler-integration-playbook.md
    :用于Slurm、PBS或LSF集成细节
  • references/runtime-debugging-and-observability.md
    :用于挂起排查、进程本地日志和环境检查
  • references/error-pattern-dictionary.md
    :用于常见MPI故障特征

Reusable Templates

可复用模板

Use
assets/templates/
when a concrete starting point is faster than rebuilding the MPI workflow from scratch, especially:
  • mpi_hello_world.c
  • mpi_compile_example.sh
  • mpi_hello_slurm.sh
  • mpi_hybrid_slurm.sh
当需要一个具体的起点而非从头构建MPI工作流时,请使用
assets/templates/
中的内容,尤其是:
  • mpi_hello_world.c
  • mpi_compile_example.sh
  • mpi_hello_slurm.sh
  • mpi_hybrid_slurm.sh

Outputs

输出内容

Summarize:
  • active MPI family or the ambiguity that still needs to be resolved
  • compile and launcher path chosen
  • rank or thread or binding geometry
  • scheduler integration assumptions
  • the exact build or runtime failure class if the workflow is being repaired
总结以下信息:
  • 当前使用的MPI系列,或仍需解决的模糊点
  • 选择的编译和启动器路径
  • 进程、线程或绑定拓扑
  • 调度器集成假设
  • 如果正在修复工作流,请明确具体的构建或运行时故障类型