English

Teaching An Old Dog New Tricks: Porting Legacy Code to Heterogeneous Compute Architectures With Automated Code Translation

Distributed, Parallel, and Cluster Computing 2025-09-11 v1 Numerical Analysis Numerical Analysis

Abstract

Legacy codes are in ubiquitous use in scientific simulations; they are well-tested and there is significant time investment in their use. However, one challenge is the adoption of new, sometimes incompatible computing paradigms, such as GPU hardware. In this paper, we explore using automated code translation to enable execution of legacy multigrid solver code on GPUs without significant time investment and while avoiding intrusive changes to the codebase. We developed a thin, reusable translation layer that parses Fortran 2003 at compile time, interfacing with the existing library Loopy to transpile to C++/GPU code, which is then managed by a custom MPI runtime system that we created. With this low-effort approach, we are able to achieve a payoff of an approximately 2-3x speedup over a full CPU socket, and 6x in multi-node settings.

Keywords

Cite

@article{arxiv.2502.05279,
  title  = {Teaching An Old Dog New Tricks: Porting Legacy Code to Heterogeneous Compute Architectures With Automated Code Translation},
  author = {Nicolas Nytko and Andrew Reisner and J. David Moulton and Luke N. Olson and Matthew West},
  journal= {arXiv preprint arXiv:2502.05279},
  year   = {2025}
}
R2 v1 2026-06-28T21:36:48.496Z