Skip to main content
QUICK REVIEW

[论文解读] Distributed Order Recording Techniques for Efficient Record-and-Replay of Multi-threaded Programs

Xiang Fu, Shiman Meng|arXiv (Cornell University)|Feb 17, 2026
Parallel Computing and Optimization Techniques被引用 0
一句话总结

本文提出 Distributed Clock (DC) 与 Distributed Epoch (DE) 记录,用于高效记录与重放 OpenMP 程序,降低同步和 I/O 开销,在 HPC 基准测试中实现高达 5.6 倍的重放加速与高达 29% 的记录开销降低;并将 ReOMP 与 ReMPI 集成以支持 MPI+OpenMP 工作负载。

ABSTRACT

After all these years and all these other shared memory programming frameworks, OpenMP is still the most popular one. However, its greater levels of non-deterministic execution makes debugging and testing more challenging. The ability to record and deterministically replay the program execution is key to address this challenge. However, scalably replaying OpenMP programs is still an unresolved problem. In this paper, we propose two novel techniques that use Distributed Clock (DC) and Distributed Epoch (DE) recording schemes to eliminate excessive thread synchronization for OpenMP record and replay. Our evaluation on representative HPC applications with ReOMP, which we used to realize DC and DE recording, shows that our approach is 2-5x more efficient than traditional approaches that synchronize on every shared-memory access. Furthermore, we demonstrate that our approach can be easily combined with MPI-level replay tools to replay non-trivial MPI+OpenMP applications. We achieve this by integrating oolname into ReMPI, an existing scalable MPI record-and-replay tool, with only a small MPI-scale-independent runtime overhead.

研究动机与目标

  • 解决混合 MPI+OpenMP 的非确定性问题,这些问题使调试与测试变得复杂。
  • 在不牺牲重放正确性的前提下,降低共享内存访问的记录开销。
  • 开发可扩展的技术,使每线程的记录解耦于全局同步并支持并行 I/O。
  • 通过与现有的 MPI 记录与重放工具(ReMPI)集成并在真实 HPC 工作负载上评估,展示兼容性与可行性。

提出的方法

  • 用 gate_in/gate_out 对共享内存区域进行检测,在记录/重放过程中捕捉访问顺序。
  • 用 Distributed Clock (DC) 记录替代序列化的线程 ID 记录,通过每个线程的时钟文件记录线程进入共享内存区域的时刻。
  • 引入 Distributed Epoch (DE) 记录,通过在给定并行条件下将指令分组到 epoch 来实现并发加载/存储,从而减少序列化。
  • 定义条件 1,允许在特定模式下对加载/存储进行一定程度的重新排序(加载可交换;在特定模式下存储可互换),同时保持重放正确性。
  • 通过时钟值和内存历史计算 epoch,以 enabling 并行重放加载/存储序列,同时保持正确性。
  • 实现 ReOMP 作为面向 OpenMP 的记录与重放工具;通过 Clang/LLVM 对 OpenMP 结构进行检测并与 libreomp.so 集成以处理 gate_in/out。
Figure 1 : The $\tt{gate\_in/out}$ functions
Figure 1 : The $\tt{gate\_in/out}$ functions

实验结果

研究问题

  • RQ1在记录与重放过程中,如何降低 OpenMP 程序中共享内存访问的记录开销?
  • RQ2在不影响确定性和正确性的前提下,是否可以安全地放宽重放过程中的序列化与同步,以适应常见的 OpenMP 模式?
  • RQ3与传统的序列化线程 ID 记录相比,DC/DE 方法在性能上有哪些好处?
  • RQ4DC/DE 技术与 MPI 级重放工具的集成效果如何,以支持 MPI+OpenMP 工作负载?

主要发现

  • 与序列化的线程 ID 记录相比,DC/DE 记录显著降低了 I/O 以及跨线程的同步开销。
  • DE 记录在条件 1 下使某些加载/存储可以并发执行,降低了重放开销。
  • 实验表明,在实际 HPC 应用(HACC,112 线程)中,记录阶段开销下降最高可达约 29%,重放速度提升可达约 5.6x。
  • ST 记录在重放阶段的跨线程通信开销高于 DC/DE,尤其当线程数量在 NUMA 域间增长时。
  • DC 记录实现并行 I/O 与 I/O 与计算的重叠,在多数场景下比 ST 提升吞吐量。
  • DE 记录在数据竞争易发或温和数据竞争场景中,通过允许 epoch 级并行性提供额外的重放性能提升。
Figure 2 : Design overview
Figure 2 : Design overview

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。