Searcharxiv⌕ Search

arXiv subjects

Andreas Klöckner

Publications and source records attributed to Andreas Klöckner.

At least 19 recordsLinked to original sources

Quadrature by Matched Asymptotic Expansion (QBMAX): Accelerating Evaluation of Layer Potentials with Boundary Layers

Evaluating layer potentials with rapidly decaying kernels becomes computationally challenging in the presence of boundary layers, as occurs for Helmholtz layer potentials with large imaginary wavenumbers. We introduce Quadrature by Matched Asymptotic Expansion (QBMAX), a high-order method that extends the Quadrature by Expansion (QBX) framework by incorporating the kernel's asymptotic decay behavior directly into the Taylor expansion of the potential. Numerical results in both 2D and 3D show improvements of up to four digits over QBX for the tested large-parameter cases, while the methods can perform similarly for smaller parameters or more strongly curved geometries. A symbolic weighted operation-count model indicates comparable costs for forming the two expansion kernels. The Taylor expansions have the same formal order, while QBMAX reduces the truncation-error constants in the flat-boundary model and generally exhibits less convergence degradation in the reported experiments.

math.NA↗

Code Generation for Near-Roofline Finite Element Actions on GPUs from Symbolic Variational Forms

We present a novel parallelization strategy for evaluating Finite Element Method (FEM) variational forms on GPUs, focusing on those that are expressible through the Unified Form Language (UFL) on simplex meshes. We base our approach on code transformations, wherein we construct a space of scheduling candidates and rank them via a heuristic cost model to effectively handle the large diversity of computational workloads that can be expressed in this way. We present a design of a search space to which the cost model is applied, along with an associated pruning strategy to limit the number of configurations that need to be empirically evaluated. The goal of our design is to strike a balance between the device's latency-hiding capabilities and the amount of state space, a key factor in attaining near-roofline performance. To make our work widely available, we have prototyped our parallelization strategy within the Firedrake framework, a UFL-based FEM solver. We evaluate the performance of our parallelization scheme on three generations of Nvidia GPUs, specifically the H200, Titan V and Tesla K40c, across a range of operators commonly used in applications, including fluid dynamics, wave propagation, and structural mechanics, in 2D and 3D geometries. Our results demonstrate that our proposed algorithm achieves more than $50\%$ roofline performance in $60\%$ of the test cases.

cs.DC↗

Canonicalization of Batched Einstein Summations for Tuning Retrieval

We present an algorithm for normalizing \emph{Batched Einstein Summation} expressions by mapping mathematically equivalent formulations to a unique normal form. Batches of einsums with the same Einstein notation that exhibit substantial data reuse appear frequently in finite element methods (FEM), numerical linear algebra, and computational chemistry. To effectively exploit this temporal locality for high performance, we consider groups of einsums in batched form. Representations of equivalent batched einsums may differ due to index renaming, permutations within the batch, and, due to the commutativity and associativity of multiplication operation. The lack of a canonical representation hinders the reuse of optimization and tuning knowledge in software systems. To this end, we develop a novel encoding of batched einsums as colored graphs and apply graph canonicalization to derive a normal form. In addition to the canonicalization algorithm, we propose a representation of einsums using functional array operands and provide a strategy to transfer transformations operating on the normal form to \emph{functional batched einsums} that exhibit the same normal form; crucial for fusing surrounding computations for memory bound einsums. We evaluate our approach against JAX, and observe a geomean speedup of $4.7\times$ for einsums from the TCCG benchmark suite and an FEM solver.

cs.MS↗

MIRGE: An Array-Based Computational Framework for Scientific Computing

MIRGE is a computational approach for scientific computing based on NumPy-like array computation, but using lazy evaluation to recast computation as data-flow graphs, where nodes represent immutable, multi-dimensional arrays. Evaluation of an array expression is deferred until its value is needed, at which point a pipeline is invoked that transforms high-level array expressions into lower-level intermediate representations (IR) and finally into executable code, through a multi-stage process. Domain-specific transformations, such as metadata-driven optimizations, GPU-parallelization strategies, and loop fusion techniques, improve performance and memory efficiency. MIRGE employs "array contexts" to abstract the interface between array expressions and heterogeneous execution environments (for example, lazy evaluation via OpenCL, or eager evaluation via NumPy or CuPy). The framework thus enables performance portability as well as separation of concerns between application logic, low-level implementation, and optimizations. By enabling scientific expressivity while facilitating performance tuning, MIRGE offers a robust, extensible platform for both computational research and scientific application development. This paper provides an overview of MIRGE. We further describe an application of MIRGE called MIRGE-Com, for supersonic combusting flows in a discontinuous Galerkin finite-element setting. We demonstrate its capabilities as a solver and highlight its performance characteristics on large-scale GPU hardware.

cs.MS↗

A Fast Direct Solver for Boundary Integral Equations Using Quadrature By Expansion

We construct and analyze a hierarchical direct solver for linear systems arising from the discretization of boundary integral equations using the Quadrature by Expansion (QBX) method. Our scheme builds on the existing theory of Hierarchical Semi-Separable (HSS) matrix operators that contain low-rank off-diagonal submatrices. We use proxy-based approximations of the far-field interactions and the Interpolative Decomposition (ID) to construct compressed HSS operators that are used as fast direct solvers for the original system. We describe a number of modifications to the standard HSS framework that enable compatibility with the QBX family of discretization methods. We establish an error model for the direct solver that is based on a multipole expansion of the QBX-mediated proxy interactions and standard estimates for the ID. Based on these theoretical results, we develop an automatic approach for setting scheme parameters based on user-provided error tolerances. The resulting solver seamlessly generalizes across two- and tree-dimensional problems and achieves state-of-the-art asymptotic scaling. We conclude with numerical experiments that support the theoretical expectations for the error and computational cost of the direct solver.

math.NA↗

Automatic Synthesis of Low-Complexity Translation Operators for the Fast Multipole Method

We demonstrate a new, hybrid symbolic-numerical method for the automatic synthesis of all families of translation operators required for the execution of the Fast Multipole Method (FMM). Our method is applicable in any dimensionality and to any translation-invariant kernel. The Fast Multipole Method, of course, is the leading approach for attaining linear complexity in the evaluation of long-range (e.g. Coulomb) many-body interactions. Low complexity in translation operators for the Fast Multipole Method (FMM) is usually achieved by algorithms specialized for a potential obeying a specific partial differential equation (PDE). Absent a PDE or specialized algorithms, Taylor series based FMMs or kernel-independent FMM have been used, at asymptotically higher expense. When symbolically provided with a constant-coefficient elliptic PDE obeyed by the potential, our algorithm can automatically synthesize translation operators requiring $\mathrm{O}(p^d)$ operations, where $p$ is the expansion order and $d$ is dimension, compared with $\mathrm{O}(p^{2d})$ operations in a naive approach carried out on (Cartesian) Taylor expansions. This is achieved by using a compression scheme that asymptotically reduces the number of terms in the Taylor expansion and then operating directly on this ``compressed'' representation. Judicious exploitation of shared subexpressions permits formation, translation, and evaluation of local and multipole expansions to be performed in $\mathrm{O}(p^{d})$ operations, while an FFT-based scheme permits multipole-to-local translations in $\mathrm{O}(p^{d-1}\log(p))$ operations. We demonstrate computational scaling of code generation and evaluation as well as numerical accuracy through numerical experiments on a number of potentials from classical physics.

math.NA↗

Integral Equation Methods for the Morse-Ingard Equations

We present two (a decoupled and a coupled) integral-equation-based methods for the Morse-Ingard equations subject to Neumann boundary conditions on the exterior domain. Both methods are based on second-kind integral equation (SKIE) formulations. The coupled method is well-conditioned and can achieve high accuracy. The decoupled method has lower computational cost and more flexibility in dealing with the boundary layer; however, it is prone to the ill-conditioning of the decoupling transform and cannot achieve as high accuracy as the coupled method. We show numerical examples using a Nyström method based on quadrature-by-expansion (QBX) with fast-multipole acceleration. We demonstrate the accuracy and efficiency of the solvers in both two and three dimensions with complex geometry.

math.NA↗

Finite elements for Helmholtz equations with a nonlocal boundary condition

Numerical resolution of exterior Helmholtz problems requires some approach to domain truncation. As an alternative to approximate nonreflecting boundary conditions and invocation of the Dirichlet-to-Neumann map, we introduce a new, nonlocal boundary condition. This condition is exact and requires the evaluation of layer potentials involving the free space Green's function. However, it seems to work in general unstructured geometry, and Galerkin finite element discretization leads to convergence under the usual mesh constraints imposed by Gårding-type inequalities. The nonlocal boundary conditions are readily approximated by fast multipole methods, and the resulting linear system can be preconditioned by the purely local operator involving transmission boundary conditions.

math.NA↗

On the Approximation of Local Expansions of Laplace Potentials by the Fast Multipole Method

In this paper, we present a generalization of the classical error bounds of Greengard-Rokhlin for the Fast Multipole Method (FMM) for Laplace potentials in three dimensions, extended to the case of local expansion (instead of point) targets. We also present a complementary, less sharp error bound proven via approximation theory whose applicability is not restricted to Laplace potentials. Our study is motivated by the GIGAQBX FMM, an algorithm for the fast, high-order accurate evaluation of layer potentials near and on the source layer. GIGAQBX is based on the FMM, but unlike a conventional FMM, which is designed to evaluate potentials at point-shaped targets, GIGAQBX evaluates local expansions of potentials at ball-shaped targets. Although the accuracy (or the acceleration error, i.e., error due to the approximation of the potential by the fast algorithm) of the conventional FMM is well understood, the acceleration error of FMM-based algorithms applied to the evaluation of local expansions has not been as well studied. The main contribution of this paper is a proof of a set of hypotheses first demonstrated numerically in the paper "A Fast Algorithm for Quadrature by Expansion in Three Dimensions," which pertain to the accuracy of FMM approximation of local expansions of Laplace potentials in three dimensions. These hypotheses are also essential to the three-dimensional error bound for GIGAQBX, which was previously stated conditionally on their truth and can now be stated unconditionally.

math.NA↗

A mechanism for balancing accuracy and scope in cross-machine black-box GPU performance modeling

The ability to model, analyze, and predict execution time of computations is an important building block supporting numerous efforts, such as load balancing, performance optimization, and automated performance tuning for high performance, parallel applications. In today's increasingly heterogeneous computing environment, this task must be accomplished efficiently across multiple architectures, including massively parallel coprocessors like GPUs. To address this challenge, we present an approach for constructing customizable, cross-machine performance models for GPU kernels, including a mechanism to automatically and symbolically gather performance-relevant kernel operation counts, a tool for formulating mathematical models using these counts, and a customizable parameterized collection of benchmark kernels used to calibrate models to GPUs in a black-box fashion. Our approach empowers a user to manage trade-offs between model accuracy, evaluation speed, and generalizability. A user can define a model and customize the calibration process, making it as simple or complex as desired, and as application-targeted or general as desired. To evaluate our approach, we demonstrate both linear and nonlinear models; each example models execution times for multiple variants of a particular computation: two matrix multiplication variants, four Discontinuous Galerkin (DG) differentiation operation variants, and two 2-D five-point finite difference stencil variants. For each variant, we present accuracy results on GPUs from multiple vendors and hardware generations. We view this customizable approach as a response to a central question in GPU performance modeling: how can we model GPU performance in a cost-explanatory fashion while maintaining accuracy, evaluation speed, portability, and ease of use, an attribute we believe precludes manual collection of kernel or hardware statistics.

cs.PF↗

A study of vectorization for matrix-free finite element methods

Vectorization is increasingly important to achieve high performance on modern hardware with SIMD instructions. Assembly of matrices and vectors in the finite element method, which is characterized by iterating a local assembly kernel over unstructured meshes, poses difficulties to effective vectorization. Maintaining a user-friendly high-level interface with a suitable degree of abstraction while generating efficient, vectorized code for the finite element method is a challenge for numerical software systems and libraries. In this work, we study cross-element vectorization in the finite element framework Firedrake via code transformation and demonstrate the efficacy of such an approach by evaluating a wide range of matrix-free operators spanning different polynomial degrees and discretizations on two recent CPUs using three mainstream compilers. Our experiments show that our approaches for cross-element vectorization achieve 30\% of theoretical peak performance for many examples of practical significance, and exceed 50\% for cases with high arithmetic intensities, with consistent speed-up over (intra-element) vectorization restricted to the local assembly kernels.

cs.MS↗

A Fast Algorithm with Error Bounds for Quadrature by Expansion

Quadrature by Expansion (QBX) is a quadrature method for approximating the value of the singular integrals encountered in the evaluation of layer potentials. It exploits the smoothness of the layer potential by forming locally-valid expansion which are then evaluated to compute the near or on-surface value of the integral. Recent work towards coupling of a Fast Multipole Method (FMM) to QBX yielded a first step towards the rapid evaluation of such integrals (and the solution of related integral equations), albeit with only empirically understood error behavior. In this paper, we improve upon this approach with a modified algorithm for which we give a comprehensive analysis of error and cost in the case of the Laplace equation in two dimensions. For the same levels of (user-specified) accuracy, the new algorithm empirically has cost-per-accuracy comparable to prior approaches. We provide experimental results to demonstrate scalability and numerical accuracy.

math.NA↗

Optimization of Fast Algorithms for Global Quadrature by Expansion Using Target-Specific Expansions

We develop an algorithm for the asymptotically fast evaluation of layer potentials close to and on the source geometry, combining Geometric Global Accelerated QBX (`GIGAQBX') and target-specific expansions. GIGAQBX is a fast high-order scheme for evaluation of layer potentials based on Quadrature by Expansion (`QBX') using local expansions formed via the Fast Multipole Method (FMM). Target-specific expansions serve to lower the cost of the formation and evaluation of QBX local expansions, reducing the associated computational effort from $O((p+1)^{2})$ to $O(p+1)$ in three dimensions, without any accuracy loss compared with conventional expansions, but with the loss of source/target separation in the expansion coefficients. GIGAQBX is a `global' QBX scheme, meaning that the potential is mediated entirely through expansions for points close to or on the boundary. In our scheme, this single global expansion is decomposed into two parts that are evaluated separately: one part incorporating near-field contributions using target-specific expansions, and one part using conventional spherical harmonic expansions of far-field contributions, noting that convergence guarantees only exist for the sum of the two sub-expansions. By contrast, target-specific expansions were originally introduced as an acceleration mechanism for `local' QBX schemes, in which the far-field does not contribute to the QBX expansion. Compared with the unmodified GIGAQBX algorithm, we show through a reproducible, time-calibrated cost model that the combined scheme yields a considerable cost reduction for the near-field evaluation part of the computation. We support the effectiveness of our scheme through numerical results demonstrating performance improvements for Laplace and Helmholtz kernels.

math.NA↗

Multiscale Hydrophobic Lipid Dynamics Simulated by Efficient Integral Equation Methods

In this paper, we first develop a mathematical model for long-range, hydrophobic attraction between amphiphilic particles. The non-pairwise interactions follow from the first variation of a hydrophobic attraction domain functional. The variation yields a hydrophobic stress that is used to numerically calculate trajectories for a collection of two-dimensional particles. The functional minimizer that accounts for hydrophobicity at molecular-aqueous interfaces is a solution to a boundary value problem of the screened Laplace equation. We reformulate the boundary value problem as a second-kind integral equation (SKIE), discretize the SKIE using a Nyström discretization and `Quadrature by Expansion' (QBX) and solve the resulting linear system iteratively using GMRES. We evaluate the required layer potentials using the `GIGAQBX' fast algorithm, a variant of the Fast Multipole Method (FMM), yielding the required particle interactions with asymptotically optimal cost. The entire scheme is adaptive, high-order, and capable of handling close-to-touching geometry. The simulated particle systems exhibit a variety of multiscale behaviors over both time and length: Over short time scales, the numerical results show self-assembly for model lipid particles. For large system simulations, the particles form realistic configurations like micelles and bilayers. Over long time scales, the bilayer shapes emerging from the simulation appear to minimize a form of bending energy.

math.NA↗

Multi-Rate Time Integration on Overset Meshes

Overset meshes are an effective tool for the computational fluid dynamic simulation of problems with complex geometries or multiscale spatio-temporal features. When the maximum allowable timestep on one or more meshes is significantly smaller than on the remaining meshes, standard explicit time integrators impose inefficiencies for time-accurate calculations by requiring that all meshes advance with the smallest timestep. With the targeted use of multi-rate time integrators, separate meshes can be time-marched at independent rates to avoid wasteful computation while maintaining accuracy and stability. This work applies time-explicit multi-rate integrators to the simulation of the compressible Navier-Stokes equations discretized on overset meshes using summation-by-parts (SBP) operators and simultaneous approximation term (SAT) boundary conditions. We introduce a class of multi-rate Adams-Bashforth (MRAB) schemes that offer significant stability improvements and computational efficiencies for SBP-SAT methods. We present numerical results that confirm the efficacy of MRAB integrators, outline a number of implementation challenges, and demonstrate a reduction in computational cost enabled by MRAB. We also investigate the use of our method in the setting of a large-scale distributed-memory parallel implementation where we discuss concerns involving load balancing and communication efficiency.

math.NA↗

A Fast Algorithm for Quadrature by Expansion in Three Dimensions

This paper presents an accelerated quadrature scheme for the evaluation of layer potentials in three dimensions. Our scheme combines a generic, high order quadrature method for singular kernels called Quadrature by Expansion (QBX) with a modified version of the Fast Multipole Method (FMM). Our scheme extends a recently developed formulation of the FMM for QBX in two dimensions, which, in that setting, achieves mathematically rigorous error and running time bounds. In addition to generalization to three dimensions, we highlight some algorithmic and mathematical opportunities for improved performance and stability. Lastly, we give numerical evidence supporting the accuracy, performance, and scalability of the algorithm through a series of experiments involving the Laplace and Helmholtz equations.

math.NA↗

Conformal Mapping via a Density Correspondence for the Double-Layer Potential

We derive a representation formula for harmonic polynomials and Laurent polynomials in terms of densities of the double-layer potential on bounded piecewise smooth and simply connected domains. From this result, we obtain a method for the numerical computation of conformal maps that applies to both exterior and interior regions. We present analysis and numerical experiments supporting the accuracy and broad applicability of the method.

math.NA↗

High-order Finite Element--Integral Equation Coupling on Embedded Meshes

This paper presents a high-order method for solving an interface problem for the Poisson equation on embedded meshes through a coupled finite element and integral equation approach. The method is capable of handling homogeneous or inhomogeneous jump conditions without modification and retains high-order convergence close to the embedded interface. We present finite element-integral equation (FE-IE) formulations for interior, exterior, and interface problems. The treatments of the exterior and interface problems are new. The resulting linear systems are solved through an iterative approach exploiting the second-kind nature of the IE operator combined with algebraic multigrid preconditioning for the FE part. Assuming smooth continuations of coefficients and right-hand-side data, we show error analysis supporting high-order accuracy. Numerical evidence further supports our claims of efficiency and high-order accuracy for smooth data.

math.NA↗