-
A structure-exploiting numbering algorithm for finite elements on extruded meshes, and its performance evaluation in Firedrake
Authors:
Gheorghe-Teodor Bercea,
Andrew T. T. McRae,
David A. Ham,
Lawrence Mitchell,
Florian Rathgeber,
Luigi Nardi,
Fabio Luporini,
Paul H. J. Kelly
Abstract:
We present a generic algorithm for numbering and then efficiently iterating over the data values attached to an extruded mesh. An extruded mesh is formed by replicating an existing mesh, assumed to be unstructured, to form layers of prismatic cells. Applications of extruded meshes include, but are not limited to, the representation of 3D high aspect ratio domains employed by geophysical finite ele…
▽ More
We present a generic algorithm for numbering and then efficiently iterating over the data values attached to an extruded mesh. An extruded mesh is formed by replicating an existing mesh, assumed to be unstructured, to form layers of prismatic cells. Applications of extruded meshes include, but are not limited to, the representation of 3D high aspect ratio domains employed by geophysical finite element simulations. These meshes are structured in the extruded direction. The algorithm presented here exploits this structure to avoid the performance penalty traditionally associated with unstructured meshes. We evaluate the implementation of this algorithm in the Firedrake finite element system on a range of low compute intensity operations which constitute worst cases for data layout performance exploration. The experiments show that having structure along the extruded direction enables the cost of the indirect data accesses to be amortized after 10-20 layers as long as the underlying mesh is well-ordered. We characterise the resulting spatial and temporal reuse in a representative set of both continuous-Galerkin and discontinuous-Galerkin discretisations. On meshes with realistic numbers of layers the performance achieved is between 70% and 90% of a theoretical hardware-specific limit.
△ Less
Submitted 28 October, 2016; v1 submitted 20 April, 2016;
originally announced April 2016.
-
Firedrake: automating the finite element method by composing abstractions
Authors:
Florian Rathgeber,
David A. Ham,
Lawrence Mitchell,
Michael Lange,
Fabio Luporini,
Andrew T. T. McRae,
Gheorghe-Teodor Bercea,
Graham R. Markall,
Paul H. J. Kelly
Abstract:
Firedrake is a new tool for automating the numerical solution of partial differential equations. Firedrake adopts the domain-specific language for the finite element method of the FEniCS project, but with a pure Python runtime-only implementation centred on the composition of several existing and new abstractions for particular aspects of scientific computing. The result is a more complete separat…
▽ More
Firedrake is a new tool for automating the numerical solution of partial differential equations. Firedrake adopts the domain-specific language for the finite element method of the FEniCS project, but with a pure Python runtime-only implementation centred on the composition of several existing and new abstractions for particular aspects of scientific computing. The result is a more complete separation of concerns which eases the incorporation of separate contributions from computer scientists, numerical analysts and application specialists. These contributions may add functionality, or improve performance.
Firedrake benefits from automatically applying new optimisations. This includes factorising mixed function spaces, transforming and vectorising inner loops, and intrinsically supporting block matrix operations. Importantly, Firedrake presents a simple public API for esca** the UFL abstraction. This allows users to implement common operations that fall outside pure variational formulations, such as flux-limiters.
△ Less
Submitted 1 July, 2016; v1 submitted 8 January, 2015;
originally announced January 2015.
-
COFFEE: an Optimizing Compiler for Finite Element Local Assembly
Authors:
Fabio Luporini,
Ana Lucia Varbanescu,
Florian Rathgeber,
Gheorghe-Teodor Bercea,
J. Ramanujam,
David A. Ham,
Paul H. J. Kelly
Abstract:
The numerical solution of partial differential equations using the finite element method is one of the key applications of high performance computing. Local assembly is its characteristic operation. This entails the execution of a problem-specific kernel to numerically evaluate an integral for each element in the discretized problem domain. Since the domain size can be huge, executing efficient ke…
▽ More
The numerical solution of partial differential equations using the finite element method is one of the key applications of high performance computing. Local assembly is its characteristic operation. This entails the execution of a problem-specific kernel to numerically evaluate an integral for each element in the discretized problem domain. Since the domain size can be huge, executing efficient kernels is fundamental. Their op- timization is, however, a challenging issue. Even though affine loop nests are generally present, the short trip counts and the complexity of mathematical expressions make it hard to determine a single or unique sequence of successful transformations. Therefore, we present the design and systematic evaluation of COF- FEE, a domain-specific compiler for local assembly kernels. COFFEE manipulates abstract syntax trees generated from a high-level domain-specific language for PDEs by introducing domain-aware composable optimizations aimed at improving instruction-level parallelism, especially SIMD vectorization, and register locality. It then generates C code including vector intrinsics. Experiments using a range of finite-element forms of increasing complexity show that significant performance improvement is achieved.
△ Less
Submitted 4 July, 2014; v1 submitted 3 July, 2014;
originally announced July 2014.