智能体工作流完成GAMESS二电子积分Fortran现代化改造

An Agentic Workflow for Legacy HPC Modernization: Converting the Two-Electron-Integral Core of GAMESS

精选理由

这篇论文用Claude Code搭了个智能体流水线,把GAMESS的老Fortran代码转换了还零误差通过,适合搞科学计算现代化的人看。

AI 摘要

一项研究提出用于遗留HPC代码现代化的智能体工作流,并在GAMESS量子化学包上完成验证。该工作流使用三个提示词专精的智能体角色,以Claude Code在隔离工作树中运行,跨越四代Claude模型。案例将GAMESS两个电子积分核心从Fortran 77转换为Fortran 2008,涉及12个源文件、56,448行代码和225个子程序。合并标准采用位级能量复现,第十二位小数的偏差即视为失败。全部源文件通过51项测试,612次测试运行中化学相关差异为零,且通过Jenkins持续集成测试。

原文 · arXiv cs.AI

An Agentic Workflow for Legacy HPC Modernization: Converting the Two-Electron-Integral Core of GAMESS

Modernizing legacy Fortran is a problem of volume: the transformations are individually routine, but the codebases can be enormous, and across much of computational science the work simply goes undone. We propose an agentic workflow that takes this work on at production scale, and we set out to measure how far such delegation can reach. In this work, three prompt-specialized agent roles operate under a version-controlled specification that the agents themselves authored and revised, while humans hold a small number of gates. The arrangement is kept safe by an exact verification oracle inherited from the domain, and the boundary of safe delegation lies exactly where that oracle stops seeing. We apply the proposed workflow in a case study, converting the two-electron-integral routines of GAMESS (General Atomic and Molecular Electronic Structure System), a mature quantum-chemistry package with a 48-year development history, from fixed-form Fortran 77 to free-form Fortran 2008. The scope of this work was twelve source files, 56,448 lines, and 225 subroutines for computing electron repulsion integrals. The agents ran as three Claude Code roles in isolated worktrees, and the work spanned four Claude model generations. Because the GAMESS group ships a standard test suite whose printed energies its user community treats as canonical, we could adopt bit-for-bit reproduction of those energies as the merge criterion, where a deviation in the twelfth decimal place counts as a failure rather than drift. All twelve source files pass a 51-test validation battery comprising the 49 standard GAMESS tests and two additional calculations, and across 612 test runs the number of chemistry-relevant differences is zero, and every file also passes the Jenkins tests that are used for continuous integration.