---
format: "aidr-story-markdown/v1"
id: "623bfefcef89120183c6c1caced482c29533acff8cefbe8e8f5d6171a41c8f20"
canonical_url: "https://aidr.today/623bfefc?lang=en"
title: "AI-Assisted GPU Porting of a 250k Line Legacy Weather Simulation Code"
lang: "en"
requested_lang: "en"
available_langs: ["en","vi"]
translation_fallback: null
fallback_fields: []
published_at: "2026-08-15T22:41:51.000Z"
category: "Infra"
topics: ["gpu","porting","legacy-code"]
source_urls: ["https://arxiv.org/abs/2608.13122"]
summary: "Recent advances in large language models have made CLI-based AI agents a practical tool for accelerating GPU porting of large legacy scientific applications. Such applications, however, are not merely old code bases; they are scientific assets whose credibility has been accumulated through long-term development, comparison with observations, and use in domain studies. GPU porting must therefore preserve this scientific validity while adapting the implementation to GPU-centric HPC systems. This paper presents a validation-centric AI-assisted GPU porting workflow through a case study of CReSS, a legacy Fortran weather simulation code with more than 250,000 lines. The workflow uses an AI agent to extract OpenMP regions, generate dump-based kernel benchmarks from physically meaningful simulation states, apply OpenACC transformations, and validate results through element-wise comparison with dumped reference data and application-level validation. Using a real typhoon simulation, the workflow produced numerically validated GPU implementations for 162 target kernels and achieved a 5.1x application-level speedup within practical wall-clock development cost. In particular, it detected nume…"
---

# AI\-Assisted GPU Porting of a 250k Line Legacy Weather Simulation Code

> [Open the canonical story](<https://aidr.today/623bfefc?lang=en>)

**Published:** 2026-08-15T22:41:51.000Z
**Category:** Infra
**Topics:** gpu, porting, legacy\-code

## Summary

Recent advances in large language models have made CLI\-based AI agents a practical tool for accelerating GPU porting of large legacy scientific applications\. Such applications, however, are not merely old code bases; they are scientific assets whose credibility has been accumulated through long\-term development, comparison with observations, and use in domain studies\. GPU porting must therefore preserve this scientific validity while adapting the implementation to GPU\-centric HPC systems\. This paper presents a validation\-centric AI\-assisted GPU porting workflow through a case study of CReSS, a legacy Fortran weather simulation code with more than 250,000 lines\. The workflow uses an AI agent to extract OpenMP regions, generate dump\-based kernel benchmarks from physically meaningful simulation states, apply OpenACC transformations, and validate results through element\-wise comparison with dumped reference data and application\-level validation\. Using a real typhoon simulation, the workflow produced numerically validated GPU implementations for 162 target kernels and achieved a 5\.1x application\-level speedup within practical wall\-clock development cost\. In particular, it detected nume…

## Sources

- [Story source](<https://arxiv.org/abs/2608.13122>)

