skip to main content


Title: Modeling optimization of stencil computations via domain-level properties
Stencil computations are widely used in the scientific simulation domain, and their performance is critical to the overall efficiency of many large-scale numerical applications. Many optimization techniques, most of them varying strategies of tiling and parallelization, exist to systematically enhance the efficiency of stencil computations. However, the effective- ness of these optimizations vary significantly depending on the wide range of properties demonstrated by the different stencils. This paper studies several well-known optimization strategies for stencils and presents a new approach to effectively guide the composition of these optimizations, by modeling their interactions with four domain-level proper- ties of stencils: spatial dimensionality, temporal order, order of accuracy, and directional dependence. When using our prediction model to guide optimizations for five real-world stencil applications, we were able to identify optimization strategies that outperformed two highly optimized stencil libraries by an average of 2.4x.  more » « less
Award ID(s):
1910488
NSF-PAR ID:
10350895
Author(s) / Creator(s):
; ; ; ;
Date Published:
Journal Name:
Thirteenth International Workshop on Programming Models and Applications for Multicores and Manycores
Page Range / eLocation ID:
35 to 44
Format(s):
Medium: X
Sponsoring Org:
National Science Foundation
More Like this
  1. Stencil computations are widely used to simulate the change of state of physical systems across a multidimensional grid over multiple timesteps. The state-of-the-art techniques in this area fall into three groups: cache-aware tiled looping algorithms, cache-oblivious divide-and-conquer trapezoidal algorithms, and Krylov subspace methods. In this paper, we present two efficient parallel algorithms for performing linear stencil computations. Current direct solvers in this domain are computationally inefficient, and Krylov methods require manual labor and mathematical training. We solve these problems for linear stencils by using DFT preconditioning on a Krylov method to achieve a direct solver which is both fast and general. Indeed, while all currently available algorithms for solving general linear stencils perform Θ(NT) work, where N is the size of the spatial grid and T is the number of timesteps, our algorithms perform o(NT) work. To the best of our knowledge, we give the first algorithms that use fast Fourier transforms to compute final grid data by evolving the initial data for many timesteps at once. Our algorithms handle both periodic and aperiodic boundary conditions, and achieve polynomially better performance bounds (i.e., computational complexity and parallel runtime) than all other existing solutions. Initial experimental results show that implementations of our algorithms that evolve grids of roughly 10^7 cells for around 10^5 timesteps run orders of magnitude faster than state-of-the-art implementations for periodic stencil problems, and 1.3× to 8.5× faster for aperiodic stencil problems. 
    more » « less
  2. Abstract

    Recently we have developed the optimal local truncation error method (OLTEM) for scalar PDEs on irregular domains and unfitted Cartesian meshes. Here, OLTEM is extended to a much more general case of a system of PDEs for the 2‐D time‐independent elasticity equations on irregular domains. Compact 9‐point uniform and nonuniform stencils (with the computational costs of linear finite elements) are used with OLTEM. The stencil coefficients are assumed to be unknown and are calculated by the minimization of the local truncation error. It is shown that the second order of accuracy is the maximum possible accuracy for 9‐point stencils independent of the numerical technique used for their derivations. The special treatment of the Neumann boundary conditions has been developed that does not increase the size of the stencils. The numerical examples are in agreement with the theoretical findings. They also show that due to the minimization of the local truncation error, OLTEM is much more accurate than linear finite elements and than quadratic finite elements (up to engineering accuracy of 0.1%–1%) at the same numbers of degrees of freedom. Due to the computational efficiency and trivial unfitted Cartesian meshes that are independent of irregular domains, the proposed technique with no remeshing for the shape change of irregular domains will be effective for many engineering applications.

     
    more » « less
  3. In this paper, we present a GPU algorithm for finite element hyperelastic simulation. We show that the interior-point method, known to be effective for robust collision resolution, can be coupled with non-Newton procedures and be massively sped up on the GPU. Newton's method has been widely chosen for the interior-point family, which fully solves a linear system at each step. After that, the active set associated with collision/contact constraints is updated. Mimicking this routine using a non-Newton optimization (like gradient descent or ADMM) unfortunately does not deliver expected accelerations. This is because the barrier functions employed in an interior-point method need to be updated at every iteration to strictly confine the search to the feasible region. The associated cost (e.g., per-iteration CCD) quickly overweights the benefit brought by the GPU, and a new parallelism modality is needed. Our algorithm is inspired by the domain decomposition method and designed to move interior-point-related computations to local domains as much as possible. We minimize the size of each domain (i.e., a stencil) by restricting it to a single element, so as to fully exploit the capacity of modern GPUs. The stencil-level results are integrated into a global update using a novel hybrid sweep scheme. Our algorithm is locally second-order offering better convergence. It enables simulation acceleration of up to two orders over its CPU counterpart. We demonstrate the scalability, robustness, efficiency, and quality of our algorithm in a variety of simulation scenarios with complex and detailed collision geometries.

     
    more » « less
  4. Abstract

    The optimal local truncation error method (OLTEM) has been developed for 2‐D time‐dependent elasticity problems on irregular domains and trivial unfitted Cartesian meshes. Compact nine‐point uniform and nonuniform stencils (similar to those for linear finite elements on uniform meshes) are used with OLTEM. The stencil coefficients are assumed to be unknown and are calculated by the minimization of the local truncation error. It is shown that the second order of accuracy is the maximum possible accuracy for nine‐point stencils independent of the numerical technique used for their derivations. The special treatment of the Neumann boundary conditions has been developed that does not increase the size of the stencils. The cases of the nondiagonal and diagonal mass matrices are considered for OLTEM. The results of numerical examples are in agreement with the theoretical findings. They also show that due to the minimization of the local truncation error, OLTEM with the nondiagonal mass matrix is much more accurate than linear finite elements and than quadratic and cubic finite elements (up to the engineering accuracy of 0.1%–1%) at the same numbers of degrees of freedom. The proposed numerical technique can be efficiently used for many engineering applications including geomechanics.

     
    more » « less
  5. Purpose The purpose of this paper is as follows: to significantly reduce the computation time (by a factor of 1,000 and more) compared to known numerical techniques for real-world problems with complex interfaces; and to simplify the solution by using trivial unfitted Cartesian meshes (no need in complicated mesh generators for complex geometry). Design/methodology/approach This study extends the recently developed optimal local truncation error method (OLTEM) for the Poisson equation with constant coefficients to a much more general case of discontinuous coefficients that can be applied to domains with different material properties (e.g. different inclusions, multi-material structural components, etc.). This study develops OLTEM using compact 9-point and 25-point stencils that are similar to those for linear and quadratic finite elements. In contrast to finite elements and other known numerical techniques for interface problems with conformed and unfitted meshes, OLTEM with 9-point and 25-point stencils and unfitted Cartesian meshes provides the 3-rd and 11-th order of accuracy for irregular interfaces, respectively; i.e. a huge increase in accuracy by eight orders for the new 'quadratic' elements compared to known techniques at similar computational costs. There are no unknowns on interfaces between different materials; the structure of the global discrete system is the same for homogeneous and heterogeneous materials (the difference in the values of the stencil coefficients). The calculation of the unknown stencil coefficients is based on the minimization of the local truncation error of the stencil equations and yields the optimal order of accuracy of OLTEM at a given stencil width. The numerical results with irregular interfaces show that at the same number of degrees of freedom, OLTEM with the 9-points stencils is even more accurate than the 4-th order finite elements; OLTEM with the 25-points stencils is much more accurate than the 7-th order finite elements with much wider stencils and conformed meshes. Findings The significant increase in accuracy for OLTEM by one order for 'linear' elements and by 8 orders for 'quadratic' elements compared to that for known techniques. This will lead to a huge reduction in the computation time for the problems with complex irregular interfaces. The use of trivial unfitted Cartesian meshes significantly simplifies the solution and reduces the time for the data preparation (no need in complicated mesh generators for complex geometry). Originality/value It has been never seen in the literature such a huge increase in accuracy for the proposed technique compared to existing methods. Due to a high accuracy, the proposed technique will allow the direct solution of multiscale problems without the scale separation. 
    more » « less