Virtual Event: Annual Seminar 2020

Legacy code base on HPC accelerators: source-to-source translation for column based numerical algorithms

Speaker

Balthasar Reuter (ECMWF)

Description

The upcoming era of exascale computing promises significant improvements in model resolution and thus forecasting skill for numerical weather codes. However, all known or presumed candidates for exascale supercomputers are going to feature novel computing hardware or heterogeneous architectures. Using these machines efficiently with today's complex operational weather prediction codes requires adapting large code bases to new programming paradigms and applying architecture specific optimizations. Within a single code base it is no longer feasible to accommodate for the bespoke optimizations that are needed to target different architectures by hand. Source-to-source translation presents itself as a technique to use existing code as-is and apply the necessary transformations and hardware-specific optimizations.
We present Loki, a Python tool purpose-built for physical parameterizations in the Integrated Forecasting System representative for a larger class of column based numerical algorithms. Loki offers automatic source-to-source translation capabilities to target a broad range of programming paradigms and spoon-feed related tools. It offers an API to encode custom transformations, allowing for expert-guided transformation. Currently, it supports multiple Fortran front ends and outputs Fortran, C, and MaxJ. It was used successfully to transform the operational cloud microphysics scheme from Fortran to C and to bring typical algorithmical patterns from Fortran to MaxJ for targeting FPGAs.

Primary author

Balthasar Reuter (ECMWF)

Co-authors

Michael Lange (ECMWF) Olivier Marsden (ECMWF)

Presentation materials

#AS2020