cs.SEApr 2, 2026

Improving MPI Error Detection and Repair with Large Language Models and Bug References

Authors: Scott Piersall, Yang Gao, Shenyang Liu, Liqiang Wang

Organizations: Dept. of Computer Science, University of Central Florida, Orlando, 32816, FL, US

Abstract

Message Passing Interface (MPI) is a foundational technology in high-performance computing (HPC), widely used for large-scale simulations and distributed training (e.g., in machine learning frameworks such as PyTorch and TensorFlow). However, maintaining MPI programs remains challenging due to their complex interplay among processes and the intricacies of message passing and synchronization. With the advancement of large language models like ChatGPT, it is tempting to adopt such technology for automated error detection and repair. Yet, our studies reveal that directly applying large language models (LLMs) yields suboptimal results, largely because these models lack essential knowledge about correct and incorrect usage, particularly the bugs found in MPI programs. In this paper, we design a bug detection and repair technique alongside Few-Shot Learning (FSL), Chain-of-Thought (CoT) reasoning, and Retrieval Augmented Generation (RAG) techniques in LLMs to enhance the large language model's ability to detect and repair errors. Surprisingly, such enhancements lead to a significant improvement, from 44% to 77%, in error detection accuracy compared to baseline methods that use ChatGPT directly. Additionally, our experiments demonstrate our bug referencing technique generalizes well to other large language models.

Figures & tables

Explore similar work

CardsList
  1. Not All Errors Are Equal: A Systematic Study of Error Propagation in Large Language Model Inference

    Jun 1, 2026Yafan Huang, Sheng Di, Guanpeng LiLLM InferenceLanguage Model Robustness

  2. MPC-Patch-Bench: Security-Aware LLM Code Patch for Multi-Party Computation

    Jun 9, 2026Yukuan Zhang, Mengxin Zheng, Qian LouSecure Multi-Party ComputationLLM Evaluation

  3. PHOENIX: Resilient LLM Training with Hot-Swapping via Zero-Overhead Checkpoint

    Jul 2, 2026Haotian Xie, Junlin Chen, Mingkai Zheng +2Fault-Tolerant Distributed TrainingDistributed Training