Supplementary materials
Authors/Creators
Description
Scientific applications continue to rely heavily on legacy Fortran codebases originally developed for homogeneous, CPU-based systems. As High-Performance Computing (HPC) evolves towards heterogeneous GPU-accelerated architectures, many modern accelerators lack native Fortran bindings, creating an urgent need to translate and optimize legacy code for portability. Frameworks like Kokkos provide performance portability across multiple architectures and a single-source C++ abstraction, but manual porting from Fortran to Kokkos requires significant domain expertise and remains time-intensive. While large language models (LLMs) have demonstrated promise in source-to-source code generation, their use in building fully autonomous workflows for translating and optimizing parallel code is largely unexplored, particularly in the context of achieving performance portability across diverse hardware. This paper presents an agentic AI workflow in which specialized LLM “agents” collaborate to translate, validate, compile, run, test, debug, and optimize Fortran kernels into portable Kokkos C++ programs. Our results show that the pipeline successfully modernizes a variety of benchmark kernels, producing performance-portable Kokkos codes across hardware partitions. Paid OpenAI models such as GPT-5 and o4-mini-high executed the full workflow for only a few U.S. dollars, producing optimized codes that exceeded the Fortran baselines, whereas open-source models like Llama4-Maverick often failed to produce functional codes. This work demonstrates the feasibility of agentic AI for Fortran-to-Kokkos code transformation and offers a path toward autonomously modernizing legacy scientific applications to run portably and efficiently across a diverse set of supercomputers. It further illustrates the potential of LLM-driven agentic systems to perform structured, domain-specific reasoning tasks in scientific and systems-oriented applications. LA-UR-25-28882
Files
AgenticAI_FortrantoKokkos.zip
Files
(814.9 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:0d19fbed542dc0aa86729dc495724746
|
814.9 kB | Preview Download |