# Low latency abstractions for extreme scale simulation.

Lead Research Organisation:
Imperial College London

Department Name: Mathematics

### Abstract

High-fidelity numerical simulations bridge the gap between theory and experiment and are essential in many areas of science. This is particularly the case when studying complex systems such as the ocean or atmosphere where the theory cannot be solved exactly and experiments are hard, or even impossible, to perform. Historically, high-performance numerical codes have been written exclusively in low-level, compiled languages such as C and Fortran. While such codes can be highly efficient and performant, they are difficult to write and maintain as the coder is required to understand all aspects of the problem from the abstract mathematical description to the specific parallel implementation. Any changes to the mathematics and/or platform are also likely to require significant amount of re-coding. Runtime code generation (RTCG) is a solution to these problems. Rather than starting with the low-level code, the performance critical sections are generated during the program runtime and then compiled with a just-in-time (JIT) compiler before they are used. This approach permits abstractions to be introduced between the mathematics and computer science, allowing specialists from either domain, but not necessarily both, to contribute to the code. The code can also be much more flexible regarding both the mathematical constructs allowed and the platforms that it can run on. Strong scaling In the current computing landscape, by far the easiest way to make your code run faster is to run it on a more powerful computer. It is therefore essential that the problem can be broken apart and distributed across the machine for solving in parallel. One would naively assume that running your problem on a machine with twice the computing power would lead to a halving of the time-to-solution but unfortunately this is rarely the case. In all pieces of software there are elements of the program that cannot be run in parallel. As the number of processors increases, this serial overhead ends up taking up an increasingly large fraction of the total runtime until no more speedup is possible. This effect is known as strong-scaling and is formalised in Amdahl's Law. Firedrake This thesis focuses on the Firedrake project, a library for numerically solving PDEs using the finite-element method (FEM). Firedrake uses RTCG to create a high-performance kernel that is used to assemble matrices. Unfortunately, compared with other FEM packages, Firedrake scales poorly in the small-problem limit (analogous to the strong-scaling limit for a fixed number of processors) during both matrix assembly and when solving the linear system. As the problem size decreases, the time-to-solution plateaus at a much greater value than is desirable. Aims and objectives Aims Improve the scaling behaviour of Firedrake in the small problem limit Objectives Profile Firedrake to identify performance bottlenecks Possibly rewrite the parallel scheduling layer of Firedrake (PyOP2) to expand the JIT-compiled kernel and reduce the time spent executing Python Novelty of the research methodology Code generation is an emerging technique in simulation science. By enabling the composition of sophisticated numerics and advanced parallel implementation for any differential equation the scientist can imagine, this technology combines productivity and performance in a combination which enables more scientists to conduct more sophisticated simulation science than ever before. Alignment to EPSRC's strategic theme and research area. This project spans the Engineering, ICT, LWEC, Manufacturing the Future, Mathematical Sciences, and Physical sciences themes. It sits in the Continuum Mechanics Research area. Collaborators: Dr Lawrence Mitchell, Durham University

### Organisations

## People |
## ORCID iD |

David Ham (Primary Supervisor) | |

Connor Ward (Student) |

### Studentship Projects

Project Reference | Relationship | Related To | Start | End | Student Name |
---|---|---|---|---|---|

EP/V520238/1 | 30/09/2020 | 31/10/2025 | |||

2478907 | Studentship | EP/V520238/1 | 30/09/2024 | 30/09/2024 | Connor Ward |