构建用于HPC代码现代化的智能体AI
Structuring agentic AI for HPC code modernization
AI总结:
提出一种结构化智能体AI方法,通过手动示例、持续可构建性和限制会话范围,成功将6万行Fortran MPI代码在数月内转换为C++ OpenMP并行代码。
摘要:
传统科学代码的现代化通常需要跟上计算资源生态系统的不断变化。并行化和从支持不佳的软件生态系统迁移是研究软件工程领域中最耗时的两项活动。本文介绍了我们在NMAP-RKPM(一个基于再生核粒子方法(RKPM)的约6万行三维显式固体力学物理引擎)的成功两阶段AI辅助现代化中的经验。我们在几个月内将这一基于Fortran的单线程MPI应用程序转换为基于C++的OpenMP并行MPI工具。虽然基于大型语言模型(LLM)的工具本身被证明不足,但我们开发了一种高度结构化的“手把手”智能体AI方法,例如提供手动创建的示例、确保持续可构建性和限制会话范围,这种方法反而非常有效。本文提供了成功的AI辅助步骤以及我们必须克服的问题,以及所选路径背后的推理。
英文摘要:
Modernization of legacy scientific codes is often necessary to keep up with the ever-evolving changes in the compute resource ecosystem. Parallelization and migration from poorly supported software ecosystems are two of the most time-consuming activities in the research software engineering field. This paper presents our experience in the successful, two-phase AI-assisted modernization of NMAP-RKPM, a roughly 60,000-line, 3D explicit solid mechanics physics engine based on the Reproducing Kernel Particle Method (RKPM). We converted this single-threaded, Fortran based MPI application into a OpenMP-parallel C++ based MPI tool in the span of a few months. While Large Language Model (LLM) based tools on their own proved inadequate, we developed a highly structured "hand-holding" agentic AI methodology, like providing manually created examples, ensuring continuous buildability and limiting session scope, that was instead highly effective. The paper provides both the AI-assisted steps that were successful and the problems that we had to overcome, alongside the reasoning behind the chosen path.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。