Minisymposium Presentation
From Fortran to GPU: The Data-Centric Journey of ECRAD
Description
Fortran remains, despite various efforts, the dominant language for answering pressing climate-related questions such as when to sell beachfront property, or where to plant olive groves. These, and more serious questions, require the use of ever larger supercomputers as the resolution of our models grows ever better. The AI revolution forces Fortran applications to run on supercomputers composed of GPUs designed to train machine learning models, but making legacy codes learn new tricks is not easy. We offer a path that requires no code changes: we lift the Fortran code and all its embedded information into a data-centric representation. We propagate specific runtime configuration details to simplify the code and, more importantly, optimize for specific array dimensions. We have created a representation of the entire radiation solver ECRAD that we can specialize for both CPU and GPU execution. Using this approach, we can run the same simulation expressed in the sequential Fortran code on parallel CPUs, and on both AMD and NVIDIA GPUs without requiring the domain scientists to rewrite or add a single line of code – and while achieving competitive performance compared to manual implementations.