Dawn: a High-level Domain-Specific Language Compiler Toolchain for Weather and Climate Applications

Authors

  • Carlos Osuna Federal Institute of Meteorology and Climatology MeteoSwiss
  • Tobias Wicky Federal Institute of Meteorology and Climatology MeteoSwiss
  • Fabian Thuering Federal Institute of Meteorology and Climatology MeteoSwiss
  • Torsten Hoefler ETH Zurich
  • Oliver Fuhrer Federal Institute of Meteorology and Climatology MeteoSwiss

DOI:

https://doi.org/10.14529/jsfi200205

Abstract

High-level programming languages that allow to express numerical methods and generate efficient parallel implementations are of key importance for the productivity of domain-scientists. The diversity and complexity of hardware architectures is imposing a huge challenge for large and complex models that must be ported and maintained for multiple architectures combining various parallel programming models. Several domain-specific languages (DSLs) have been developed to address the portability problem, but they usually impose a parallel model for specific numerical methods and support optimizations for limited scope operators. Dawn provides a high-level concise language for expressing numerical finite difference/volume methods using a sequential and descriptive language. The sequential statements are transformed into an efficient target-dependent parallel implementation by the Dawn compiler toolchain. We demonstrate our approach on the dynamical solver of the COSMO model, achieving performance improvements and code size reduction of up to 2x and 5x, respectively.

References

Bertagna, L., Deakin, M., Guba, O., Sunderland, D., Bradley, A.M., Tezaur, I.K., Taylor, M.A., Salinger, A.G.: Hommexx 1.0: A performance portable atmospheric dynamical core for the energy exascale earth system model. Geoscientific Model Development Discussions 2018, 1–23 (2018), DOI: 10.5194/gmd-2018-218

Christen, M., Schenk, O., Burkhart, H.: Patus: A code generation and autotuning framework for parallel iterative stencil computations on modern microarchitectures. In: 2011 IEEE International Parallel Distributed Processing Symposium, 16-20 May 2011, Anchorage, AK,USA. pp. 676–687. IEEE (2011), DOI: 10.1109/IPDPS.2011.70

Clement, V., Ferrachat, S., Fuhrer, O., Lapillonne, X., Osuna, C.E., Pincus, R., Rood, J., Sawyer, W.: The CLAW DSL: Abstractions for performance portable weather and climate models. In: Proceedings of the Platform for Advanced Scientific Computing Conference, Basel, Switzerland. pp. 2:1–2:10. ACM, New York, NY, USA (2018), DOI: 10.1145/3218176.3218226

Doms, G., Baldauf, M.: A Description of the Nonhydrostatic Regional COSMO-Model – Part I: Dynamics and Numerics. COSMO – Consortium for Small-Scale Modelling (2015), http://cosmo-model.org/content/model/documentation/core/cosmoDyncsNumcs.pdf

Edwards, H.C., Trott, C.R., Sunderland, D.: Kokkos: Enabling manycore performance portability through polymorphic memory access patterns. Journal of Parallel and Distributed Computing 74(12), 3202–3216 (2014), DOI: 10.1016/j.jpdc.2014.07.003

Fleming, P.J., Wallace, J.J.: How not to lie with statistics: the correct way to summarize benchmark results. Communications of the ACM 29(3), 218–221 (1986)

Frank, D.J., Dennard, R.H., Nowak, E., Solomon, P.M., Taur, Y., Wong, H.S.P.: Device scaling limits of Si MOSFETs and their application dependencies. Proceedings of the IEEE 89(3), 259–288 (2001), DOI: 10.1109/5.915374

Fuhrer, O., Chadha, T., Hoefler, T., Kwasniewski, G., et al.: Near-global climate simulation at 1km resolution: establishing a performance baseline on 4888 GPUs with COSMO 5.0. Geoscientific Model Development 11(4), 1665–1681 (2018), DOI: 10.5194/gmd-11-1665-2018

Gurvan, M., Bourdall-Badie, R., Bouttier, P.A., Bricaud, C., et al.: NEMO ocean engine (2017), DOI: 10.5281/zenodo.3248739

Gysi, T., Osuna, C., Fuhrer, O., Bianco, M., Schulthess, T.C.: 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, 15-20 Nov. 2015, Austin, TX, USA. pp. 1–12. IEEE (2015), DOI: 10.1145/2807591.2807627

Gysi, T., Grosser, T., Hoefler, T.: MODESTO: Data-centric Analytic Optimization of Complex Stencil Programs on Heterogeneous Architectures. In: Proceedings of the 29th International Conference on Supercomputing, Newport Beach, CA, USA. pp. 177–186. ACM, New York, NY, USA (2015), DOI: 10.1145/2751205.2751223

Gysi, T., Grosser, T., Hoefler, T.: Absinthe: Learning an Analytical Performance Model to Fuse and Tile Stencil Codes in One Shot. In: Proceedings of the 28th International Conference on Parallel Architectures and Compilation Techniques, 23-26 Sept. 2019, Seattle, WA, USA. pp. 370–382. IEEE (2019), DOI: 10.1109/PACT.2019.00036

Hoefler, T., Belli, R.: Scientific Benchmarking of Parallel Computing Systems. In: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, 15-20 Nov. 2015, Austin, TX, USA. pp. 1–12. ACM (2015), DOI: 10.1145/2807591.2807644

Kuck, D.J., Kuhn, R.H., Padua, D.A., Leasure, B., Wolfe, M.: Dependence graphs and compiler optimizations. In: Proceedings of the 8th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Williamsburg, Virginia. pp. 207–218. ACM, New York, NY, USA (1981), DOI: 10.1145/567532.567555

Lattner, C.: LLVM and Clang: Next generation compiler technology. In: The BSD conference, May 2008, Ottawa, Canada. vol. 5 (2008)

Lin, S.J.: A “vertically Lagrangian” finite-volume dynamical core for global models. Monthly Weather Review 132(10), 2293–2307 (2004), DOI: 10.1175/1520-0493(2004)132¡2293:AVLFDC¿2.0.CO;2

Melvin, T., Mullerworth, S., Ford, R., Maynard, C., Hobson, M.: LFRic: Building a new Unified Model. In: EGU General Assembly Conference Abstracts. EGU General Assembly Conference Abstracts, vol. 19, p. 13021 (2017)

Mullapudi, R.T., Vasista, V., Bondhugula, U.: Polymage: Automatic optimization for image processing pipelines. SIGARCH Comput. Archit. News 43(1), 429–443 (2015), DOI: 10.1145/2786763.2694364

Osuna C., Clement V.: MeteoSwiss-APN/HIR 0.0.1 (2019), DOI: 10.5281/zenodo.2629314

Osuna C., Thuering F., Wicky T., Dahm J., et al.: MeteoSwiss-APN/dawn: 0.0.2 (2020), DOI: 10.5281/zenodo.3870862

Porter, A.R., Appleyard, J., Ashworth, M., Ford, R.W., Holt, J., Liu, H., Riley, G.D.: Portable multi- and many-core performance for finite-difference or finite-element codes – application to the free-surface component of NEMO (NEMOLite2D 1.0). Geoscientific Model Development 11(8), 3447–3464 (2018), DOI: 10.5194/gmd-11-3447-2018

Ragan-Kelley, J., Barnes, C., Adams, A., Paris, S., Durand, F., Amarasinghe, S.: Halide: A language and compiler for optimizing parallelism, locality, and recomputation in image processing pipelines. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, Seattle, Washington, USA. pp. 519–530. ACM, New York, NY, USA (2013), DOI: 10.1145/2491956.2462176

Rawat, P.S., Rastello, F., Sukumaran-Rajam, A., Pouchet, L.N., Rountev, A., Sadayappan, P.: Register optimizations for stencils on GPUs. ACM SIGPLAN Notices 53(1), 168–182 (2018), DOI: 10.1145/3178487.3178500

Schar, C., Fuhrer, O., Arteaga, A., Ban, N., et al.: Kilometer-scale climate models: Prospects and challenges. Bulletin of the American Meteorological Society 101(5), E567–E587 (2020), DOI: 10.1175/BAMS-D-18-0167.1

Schulthess, T., Bauer, P., Fuhrer, O., Hoefler, T., Schaer, C., Wedi, N.: Reflecting on the goal and baseline for exascale computing: a roadmap based on weather and climate simulations. Computing in Science and Engineering (CiSE) 21(1), 30–41 (2019), DOI: 10.1109/MCSE.2018.2888788

Zangl, G., Reinert, D., Ripodas, P., Baldauf, M.: The ICON (ICOsahedral Non-hydrostatic) modelling framework of DWD and MPI-M: Description of the non-hydrostatic dynamical core. Quarterly Journal of the Royal Meteorological Society 141(687), 563–579 (2015), DOI: 10.1002/qj.2378

Downloads

Published

2020-07-21

How to Cite

Osuna, C., Wicky, T., Thuering, F., Hoefler, T., & Fuhrer, O. (2020). Dawn: a High-level Domain-Specific Language Compiler Toolchain for Weather and Climate Applications. Supercomputing Frontiers and Innovations, 7(2), 79–97. https://doi.org/10.14529/jsfi200205