The International Conference for High Performance Computing, Networking, Storage, and Analysis

Research and ACM SRC Posters Archive

From Legacy to Portable: An Agentic AI Workflow for Fortran Code Translation and Cross-Architecture Optimization


Poster Type: Research Posters

Author: Sparsh Gupta (Los Alamos National Laboratory (LANL), Franklin W. Olin College of Engineering), Kamalavasan Kamalakkannan (Los Alamos National Laboratory (LANL)), Maxim Moraru (Los Alamos National Laboratory (LANL)), Galen Shipman (Los Alamos National Laboratory (LANL)), Patrick Diehl (Los Alamos National Laboratory (LANL))

Supervisor:

Abstract: Legacy Fortran codes remain central to many scientific applications but are poorly suited to today’s GPU-accelerated heterogeneous architectures. Manual porting to performance-portable frameworks like Kokkos is time-consuming and requires deep domain expertise, creating a major barrier to modernization. We present a novel autonomous agentic AI workflow that leverages large language models (LLMs) to translate and optimize Fortran kernels into portable Kokkos C++ implementations. Our framework employs specialized agents for translation, compilation, execution, error handling, testing, and optimization, orchestrated with SLURM and Spack on diverse GPU platforms. Using OpenAI’s proprietary models, we achieved fully autonomous kernel translation in under $3.5 per kernel, while iterative optimization consistently improved GFLOPS performance. In contrast, open-source models like Llama 4 Maverick performed poorly. In the poster session, we will present the workflow design, benchmark results across architectures, token cost analysis, and optimization gains, highlighting opportunities for scalable, fully autonomous modernization of scientific codebases.

Best Poster Finalist (BP): no
Poster: PDF
Poster Summary: PDF


Back to Poster Archive Listing