### Erik Schnetter (Perimeter Institute for Theoretical Physics, Waterloo, Canada)

#### Automated Code Generation for Solving PDEs on Modern HPC Architectures

Modern HPC applications employ increasingly advanced discretisation methods to study multi-physics problems. Modern HPC architectures consist of heterogeneous multi-core many-node systems with deep memory hierarchies. Developing applications that are able to explore cutting-edge physics on cutting-edge HPC systems has become a complex task that requires significant HPC knowledge and experience, where entirely too much hardware detail is exposed to the application developer.

We describe Chemora [1,2], a generic framework for solving systems of Partial Differential Equations (PDEs) that targets modern HPC architectures. Chemora is based on Cactus, which sees prominent usage in the computational relativistic astrophysics community, and uses automated code generation to create C++, CUDA, or OpenCL code. PDEs are expressed either in a high-level latex-like language or in Mathematica. Discretisation is defined separately from equations, and can include e.g. Finite Differences, Discontinuous Galerkin Finite Elements, Adaptive Mesh Refinement (AMR), or multi-block systems.

Using the Einstein equations as example, we show how Chemora can be used to implement complex systems of PDEs for CPUs and accelerators. Important high-level and low-level transformations and optimizations are applied automatically, leading to code with quite reasonable efficiency. The performance often surpasses manually written code, if only because automated code generation simplifies exploring the optimization parameter space of complex code bases.

References :

[1] M. Blazewicz, I. Hinder, D. M. Koppelman, S. R. Brandt, M. Ciznicki, M. Kierzynka, F. Löffler, E. Schnetter, J. Tao. From physics model to results: An optimizing framework for cross-architecture code generation. Scientific Programming, 21:1–16, 2013. (doi:10.3233/SPR-130360)

[2] M. Blazewicz, S. R. Brandt, P. Diener, D. M. Koppelman, K. Kurowski, F. Löffler, E. Schnetter, J. Tao. A massive data parallel computational framework for petascale/exascale hybrid computer systems. In Applications, Tools and Techniques on the Road to Exascale Computing, pages 351 – 358, 2012. arXiv:1201.2118 [cs.DC]. (doi:10.3233/978-1-61499-041-3-351)