Structuring agentic AI for HPC code modernization

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.

Paper

References (19)

08Keep comments concise and aligned with original algorithm sections
09Preserve important original Fortran comments in translated C++ code
10Use `hash_sort` in `src/sub_shock_correction_c.cpp` and `src/sub_shock_correction.hpp` as an example of how to handle MPI
11src/sub_updsup2.f90` as another more complex example (commit 270115e)
12At minimum, compile touched objects; run full make when practical

Scroll for more · 7 remaining

Similar papers

© 2026 NYSGPT2525 LLC