Role-Oriented Code Generation in an Engine for Solving Hyperbolic PDE Systems
- 5 Downloads
The development of a high performance PDE solver requires the combined expertise of interdisciplinary teams with respect to application domain, numerical scheme and low-level optimization. In this paper, we present how the ExaHyPE engine facilitates the collaboration of such teams by isolating three roles: application, algorithms, and optimization expert. We thus support team members in letting them focus on their own area of expertise while integrating their contributions into an HPC production code.
Inspired by web application development practices, ExaHyPE relies on two custom code generation modules, the Toolkit and the Kernel Generator, which follow a Model-View-Controller architectural pattern on top of the Jinja2 template engine library. Using Jinja2’s templates to abstract the critical components of the engine and generated glue code, we isolate the application development from the engine. The template language also allows us to define and use custom template macros that isolate low-level optimizations from the numerical scheme described in the templates.
We present three use cases, each focusing on one of our user roles, showcasing how the design of the code generation modules allows to easily expand the solver schemes to support novel demands from applications, to add optimized algorithmic schemes (with reduced memory footprint, e.g.), or provide improved low-level SIMD vectorization support.
KeywordsExaHyPE Code generation High-order discontinuous Galerkin Hyperbolic PDE systems Model-View-Controller Jinja2
Acknowledgements and Funding
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 671698. We thank the Gauss Centre for Supercomputing e.V. (www.gauss-centre.eu) for providing computing resources on the GCS Supercomputer SuperMUC at Leibniz Supercomputing Centre (www.lrz.de).
- 1.Alnaes, M.S., Logg, A., Ølgaard, K.B., Rognes, M.E., Wells, G.N.: Unified form language: a domain-specific language for weak formulations of partial differential equations. ACM Trans. Math. Softw. 40(2) (2014)Google Scholar
- 2.Charrier, D., Hazelwood, B., Weinzierl, T.: Enclave tasking for discontinuous Galerkin methods on dynamically adaptive meshes. SIAM J. Scient. Comput. (in press). arXiv:1806.07984
- 3.Dumbser, M., Fambri, F., Tavelli, M., Bader, M., Weinzierl, T.: Efficient implementation of ADER discontinuous Galerkin schemes for a scalable hyperbolic PDE engine. Axioms 278 (2018). https://doi.org/10.3390/axioms7030063
- 5.Duru, K., Rannabauer, L., Ling, O.K.A., Gabriel, A.A., Igel, H., Bader, M.: A stable discontinuous Galerkin method for linear elastodynamics in geometrically complex media using physics based numerical fluxes (2019). arXiv:1907.02658
- 6.Eibl, S., Rüde, U.: A modular and extensible software architecture for particle dynamics. In: 8th International Conference on Discrete Element Methods (2019). arXiv:1906.1096
- 7.Fambri, F., Dumbser, M., Köppel, S., Rezzolla, L., Zanotti, O.: ADER discontinuous Galerkin schemes for general-relativistic ideal magnetohydrodynamics. Mon. Not. R. Astron. Soc. 477, 4543–4564 (2018)Google Scholar
- 9.Heinecke, A., Henry, G., Hutchinson, M., Pabst, H.: LIBXSMM: accelerating small matrix multiplications by runtime code generation. In: SC 2016: International Conference for HPC, Networking, Storage and Analysis, pp. 981–991 (2016)Google Scholar
- 10.Kempf, D., Heß, R., Müthing, S., Bastian, P.: Automatic Code Generation for High-Performance Discontinuous Galerkin Methods on Modern Architectures. arXiv e-prints (2018). arXiv:1812.08075
- 11.Kirby, R.C., Mitchell, L.: Code generation for generally mapped finite elements. ACM Trans. Math. Softw. 45(4) (2019)Google Scholar
- 12.Krenz, L., Rannabauer, L., Bader, M.: A high-order discontinuous Galerkin solver with dynamic adaptive mesh refinement to simulate cloud formation processes. In: 13th International Conference on Parallel Processing and Applied Mathematics (PPAM 2019). LNCS, vol. 12043 (2020). arXiv:1905.05524
- 14.Reinarz, A., Charrier, D.E., Bader, M., Bovard, L., Dumbser, M., Duru, K., Fambri, F., Gabriel, A.A., Gallard, J.M., Köppel, S., Krenz, L., Rannabauer, L., Rezzolla, L., Samfass, P., Tavelli, M., Weinzierl, T.: ExaHyPE: an engine for parallel dynamically adaptive simulations of wave problems. Comp. Phys. Comm. 107251 (2020)Google Scholar
- 16.Uphoff, C., Bader, M.: Yet another tensor toolbox for discontinuous Galerkin methods and other applications. ACM Trans. Math. Softw. (under review). arXiv:1903.11521