AutoCheck: Automatically Identifying Variables for Checkpointing by Data Dependency Analysis

Xiang Fu, Weiping Zhang, Shiman Meng, Xin Huang, Wubiao Xu, Luanzheng Guo, Kento Sato

Checkpoint/Restart (C/R) is a cornerstone of fault tolerance in High-Performance Computing (HPC) and cloud environments. As systems scale and the Mean Time Between Failures (MTBF) decreases, the ability to efficiently save and restore application state becomes critical. However, identifying exactly which variables are necessary for a successful restart—a process known as application-level checkpointing—remains a significant challenge for both domain scientists and system engineers.

Presented at SC24, AutoCheck is a tool designed to automate this identification process. By using dynamic data dependency analysis, it pinpoints the minimal set of variables required for recovery, drastically reducing storage overhead while maintaining restart accuracy.

The Challenge: Manual vs. System-Level Checkpointing

Currently, developers face a difficult choice when implementing fault tolerance:

  1. System-level C/R: This approach saves the entire machine state (memory, registers, etc.). While easy to implement, it produces massive checkpoint files that are slow to write and consume significant storage.
  2. Application-level C/R: This approach saves only the "critical variables" needed to resume computation. It is highly efficient but requires deep knowledge of the code's data flow. For complex, multi-million-line applications, manually identifying these variables is error-prone and tedious.

AutoCheck bridges this gap by providing an automated, analytical model to discover these critical variables without requiring the developer to have expert-level knowledge of the application's internal mechanics.

The AutoCheck Methodology

AutoCheck follows a structured pipeline to move from a raw execution trace to a refined list of checkpointable variables.

The end-to-end workflow of AutoCheck, from dynamic execution trace to critical variable identification.

1. Dynamic Trace Analysis

Unlike static analysis, which often struggles with pointer aliasing and complex branching, AutoCheck uses LLVM-Tracer to capture a dynamic execution trace. This trace records every instruction, memory address, and register value during a sample run.

Detailed breakdown of the dynamic instruction trace format used by AutoCheck.

As shown in the trace format above, AutoCheck captures granular details including basic block IDs, opcodes (e.g., "Load"), and operand values. This allows the tool to see exactly which memory locations are accessed, bypassing the ambiguities of source-code-level pointers.

2. Identifying Main-Loop Input (MLI) Variables

The tool focuses on the "main computation loop" of an application. It identifies Main-Loop Input (MLI) variables—those defined before the loop but utilized within it. These form the candidate set for checkpointing.

3. Data Dependency Graph (DDG) Construction and Contraction

AutoCheck builds a massive instruction-level Data Dependency Graph (DDG). To make this manageable, it employs a "graph contraction" strategy. It recursively replaces temporary variables and registers with their "grandparents" in the dependency chain until only the relationships between high-level MLI variables remain. This process effectively filters out the "noise" of local computation.

4. Heuristic Identification

Finally, AutoCheck applies four specific heuristics to the contracted graph to flag variables for checkpointing:

  • Write-After-Read (WAR): Variables that are modified across loop iterations.
  • Outcome: Variables containing final results needed after the loop completes.
  • Read-After-Partially-Overwritten (RAPO): Arrays where only specific elements are updated.
  • Index: Loop induction variables and counters.

Key Results and Efficiency

The researchers evaluated AutoCheck on 14 representative HPC benchmarks, including the NAS Parallel Benchmarks (NPB), ECP Proxy Apps (like CoMD and AMG), and the HACC cosmology simulation.

  • Accuracy: AutoCheck successfully identified the correct critical variables for all 14 applications. Restarts using these variables were verified to be bit-wise identical to non-failure runs.
  • Storage Savings: The impact on storage is transformative. For the AMG benchmark, a traditional system-level checkpoint required 647 GB, whereas AutoCheck identified a set of variables requiring only 0.01 MB—a reduction of seven orders of magnitude.
  • Performance: The analysis is rapid. On average, AutoCheck processes traces in approximately 170 seconds, which can be further reduced to 70 seconds using OpenMP parallelization.

Conclusion and Future Directions

AutoCheck demonstrates that dynamic data dependency analysis can effectively automate the most difficult part of application-level checkpointing. While currently a post-processing tool for C/C++ applications, future work aims to integrate AutoCheck directly into the LLVM compiler as a pass. This would allow for "on-the-fly" analysis and potentially the automatic insertion of checkpointing code, further lowering the barrier to robust fault tolerance in large-scale computing.

Summary updated

BibTeX
@misc{fu2024autocheck,
  author = {Xiang Fu and Weiping Zhang and Shiman Meng and Xin Huang and Wubiao Xu and Luanzheng Guo and Kento Sato},
  title = {{AutoCheck: Automatically Identifying Variables for Checkpointing by Data Dependency Analysis}},
  year = {2024},
  eprint = {2408.06082},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.06082},
}
Figure