Automatic Port to OpenACC/OpenMP for Physical Parameterization in Climate and Weather Code Using the CLAW Compiler

Valentin Clement, Philippe Marti, Xavier Lapillonne, Oliver Fuhrer, William Sawyer


In order to benefit from emerging high-performance computing systems, weather and climate models need to be adapted to run efficiently on different hardware architectures such as accelerators. This is a major challenge for existing community models that represent extremely large codebase written in Fortran. Large parts of the code can be ported using OpenACC compiler directives but for time-critical components such as physical parameterizations, code restructuring and optimizations specific to a hardware architecture are necessary to obtain high performance. In an effort to retain a single source code for multiple target architectures, the CLAW Compiler and the CLAW Single Column Abstraction were introduced. We report on the extension of the CLAW SCA to handle ELEMENTAL functions and subroutines. We demonstrate the new capability on the JSBACH land surface scheme of the ICON climate model. With the extension, JSBACH can be automatically ported to OpenACC or OpenMP for accelerators with minimal to no change to the original code.

Full Text:



Clement, V., Ferrachat, S., Fuhrer, O., et al.: The CLAWDSL: Abstractions for performance portable weather and climate models. In: Proceedings of the Platform for Advanced Scientific Computing Conference. pp. 2:1–2:10. PASC ’18, ACM, New York, NY, USA (2018), DOI: 10.1145/3218176.3218226

Crueger, T., Giorgetta, M.A., Brokopf, R., et al.: ICON-A, the atmosphere component of the ICON Earth system model: II. model evaluation. Journal of Advances in Modeling Earth Systems 10(7), 1638–1662 (2018), DOI: 10.1029/2017MS001233

Fuhrer, O., Osuna, C., Lapillonne, X., et al.: Towards a performance portable, architecture agnostic implementation strategy for weather and climate models. Supercomputing Frontiers and Innovations 1(1), 45–62 (2014), DOI: 10.14529/jsfi140103

Giorgetta, M.A., Brokopf, R., Crueger, T., et al.: ICON-A, the atmosphere component of the ICON Earth system model: I. model description. Journal of Advances in Modeling Earth Systems 10(7), 1613–1637 (2018), DOI: 10.1029/2017MS001242

Gysi, T., Osuna, C., Fuhrer, O., et al.: Stella: A domain-specific tool for structured grid methods in weather and climate models. In: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis. pp. 41:1–41:12. SC ’15, ACM, New York, NY, USA (2015), DOI: 10.1145/2807591.2807627

Lapillonne, X., Fuhrer, O.: Using compiler directives to port large scientific applications to GPUs: An example from atmospheric science. Parallel Processing Letters 24(1) (2014), DOI: 10.1142/S0129626414500030

Mauritsen, T., Bader, J., Becker, T., et al.: Developments in the MPI-M Earth System Model version 1.2 (MPI-ESM1.2) and Its Response to Increasing CO2. Journal of Advances in Modeling Earth Systems 11(4), 998–1038 (2019), DOI: 10.1029/2018MS001400

Muller, M., Aoki, T.: Hybrid Fortran: High productivity GPU porting framework applied to Japanese weather prediction model. CoRR abs/1710.08616 (2017),

Omni CompilerProject: Omni Compiler Project - An Infrastructure for Source-to-Source Transformation. (2013-2019), accessed: 2019-09-02

OpenACC Standard: The OpenACC application programming interface - version 2.7. (2018), accessed: 2019-09-02

OpenMP Architecture Review Board: OpenMP application programming interface - version 5.0. (2018), accessed: 2019-09-03

XcalableMP Specification Working Group: XcodeML/Fortran Specification. (2017), accessed: 2019-09-02

Publishing Center of South Ural State University (454080, Lenin prospekt, 76, Chelyabinsk, Russia)