Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “stencil computation”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 19 records

Interference Lattice-based Loop Nest Tilings for Stencil Computations

A common method for improving performance of stencil operations on structured multi-dimensional discretization grids is loop tiling. Tile shapes and sizes are usually determined heuristically, based on the size of the primary data cache. We provide a lower bound on the numbers of cache misses that must be incurred by any tiling, and a close achievable bound using a particular tiling based on the grid interference lattice. The latter tiling is used to derive highly efficient loop orderings. The total number of cache misses of a code is the sum of (necessary) cold misses and misses caused by elements being dropped from the cache between successive loads (replacement misses). Maximizing temporal locality is equivalent to minimizing replacement misses. Temporal locality of loop nests implementing stencil operations is optimized by tilings that avoid data conflicts. We divide the loop nest iteration space into conflict-free tiles, derived from the cache miss equation. The tiling involves the definition of the grid interference lattice an equivalence class of grid points whose images in main memory map to the same location in the cache-and the construction of a special basis for the lattice. Conflicts only occur on the boundaries of the tiles, unless the tiles are too thin. We show that the surface area of the tiles is bounded for grids of any dimensionality, and for caches of any associativity, provided the eccentricity of the fundamental parallelepiped (the tile spanned by the basis) of the lattice is bounded. Eccentricity is determined by two factors, aspect ratio and skewness. The aspect ratio of the parallelepiped can be bounded by appropriate array padding. The skewness can be bounded by the choice of a proper basis. Combining these two strategies ensures that pathologically thin tiles are avoided. They do not, however, minimize replacement misses per se. The reason is that tile visitation order influences the number of data conflicts on the tile boundaries. If two adjacent tiles are visited successively, there will be no replacement misses on the shared boundary. The iteration space may be covered with pencils larger than the size of the cache while avoiding data conflicts if the pencils are traversed by a scanning-face method. Replacement misses are incurred only on the boundaries of the pencils, and the number of misses is minimized by maximizing the volume of the scanning face, not the volume of the tile. We present an algorithm for constructing the most efficient scanning face for a given grid and stencil operator. In two dimensions it is based on a continued fraction algorithm. In three dimensions it follows Voronoi's successive minima algorithm. We show experimental results of using the scanning face, and compare with canonical loop orderings.

VanderWijngaart, Rob F.↗

Using Verified Lifting to Optimize Legacy Stencil Codes (Final Project Report)

This project investigated new techniques for compiling stencil and stencil-like computations. Stencils computations are commonly found in applications such as image processing, physical simulations, image processing, and machine learning. In recent years, many high-performance domain-specific languages (DSLs) have been proposed to optimize stencil computations. To leverage such DSLs, however, existing codes often need to be rewritten. Such rewriting is manual, labor intensive, and error-prone. To alleviate such issues, this project investigated the application of program synthesis and artificial learning techniques to enable stencil computations to automatically leverage new high-performance DSLs. Rather than constructing syntax driven rules, verified lifting uses program synthesis to search for a target code fragment to compile the given input code into. In addition, it also searches for a proof that validates how the found target code fragment preserves the semantics of the original input. Thus, the target code fragment is guaranteed to be semantically equivalent to the input.

97 MATHEMATICS AND COMPUTING↗

SOMA: Observability, monitoring, and in situ analytics for exascale applications

With the rise of exascale systems and large, data-centric workflows, the need to observe and analyze high performance computing (HPC) applications during their execution is becoming increasingly important. HPC applications are typically not designed with online monitoring in mind, therefore, the observability challenge lies in being able to access and analyze interesting events with low overhead while seamlessly integrating such capabilities into existing and new applications. We explore how our service-based observation, monitoring, and analytics (SOMA) approach to collecting and aggregating both application-specific diagnostic data and performance data addresses these needs. Furthermore, we present our SOMA framework and demonstrate its viability with LULESH, a hydrodynamics proxy application. Then we focus on Astaroth, a multi-GPU library for stencil computations, highlighting the integration of the TAU and APEX performance tools and SOMA for application and performance data monitoring.

97 MATHEMATICS AND COMPUTING↗

Compact finite difference schemes with spectral-like resolution

The present finite-difference schemes for the evaluation of first-order, second-order, and higher-order derivatives yield improved representation of a range of scales and may be used on nonuniform meshes. Various boundary conditions may be invoked, and both accurate interpolation and spectral-like filtering can be accomplished by means of schemes for derivatives at mid-cell locations. This family of schemes reduces to the Pade schemes when the maximal formal accuracy constraint is imposed with a specific computational stencil. Attention is given to illustrative applications of these schemes in fluid dynamics.

Lele, Sanjiva K.↗

An Immersed Boundary Method for Solving the Compressible Navier-Stokes Equations with Fluid Structure Interaction

An immersed boundary method for the compressible Navier-Stokes equation and the additional infrastructure that is needed to solve moving boundary problems and fully coupled fluid-structure interaction is described. All the methods described in this paper were implemented in NASA's LAVA solver framework. The underlying immersed boundary method is based on the locally stabilized immersed boundary method that was previously introduced by the authors. In the present paper this method is extended to account for all aspects that are involved for fluid structure interaction simulations, such as fast geometry queries and stencil computations, the treatment of freshly cleared cells, and the coupling of the computational fluid dynamics solver with a linear structural finite element method. The current approach is validated for moving boundary problems with prescribed body motion and fully coupled fluid structure interaction problems in 2D and 3D. As part of the validation procedure, results from the second AIAA aeroelastic prediction workshop are also presented. The current paper is regarded as a proof of concept study, while more advanced methods for fluid structure interaction are currently being investigated, such as geometric and material nonlinearities, and advanced coupling approaches.

Equations↗

High-Order Methods for Computational Fluid Dynamics: A Brief Review of Compact Differential Formulations on Unstructured Grids

Popular high-order schemes with compact stencils for Computational Fluid Dynamics (CFD) include Discontinuous Galerkin (DG), Spectral Difference (SD), and Spectral Volume (SV) methods. The recently proposed Flux Reconstruction (FR) approach or Correction Procedure using Reconstruction (CPR) is based on a differential formulation and provides a unifying framework for these high-order schemes. Here we present a brief review of recent developments for the FR/CPR schemes as well as some pacing items.

Huynh, H. T.↗

Charon Message-Passing Toolkit for Scientific Computations

The Charon toolkit for piecemeal development of high-efficiency parallel programs for scientific computing is described. The portable toolkit, callable from C and Fortran, provides flexible domain decompositions and high-level distributed constructs for easy translation of serial legacy code or design to distributed environments. Gradual tuning can subsequently be applied to obtain high performance, possibly by using explicit message passing. Charon also features general structured communications that support stencil-based computations with complex recurrences. Through the separation of partitioning and distribution, the toolkit can also be used for blocking of uni-processor code, and for debugging of parallel algorithms on serial machines. An elaborate review of recent parallelization aids is presented to highlight the need for a toolkit like Charon. Some performance results of parallelizing the NAS Parallel Benchmark SP program using Charon are given, showing good scalability.

VanderWijngaart, Rob F.↗

Charon Message-Passing Toolkit for Scientific Computations

The Charon toolkit for piecemeal development of high-efficiency parallel programs for scientific computing is described. The portable toolkit, callable from C and Fortran, provides flexible domain decompositions and high-level distributed constructs for easy translation of serial legacy code or design to distributed environments. Gradual tuning can subsequently be applied to obtain high performance, possibly by using explicit message passing. Charon also features general structured communications that support stencil-based computations with complex recurrences. Through the separation of partitioning and distribution, the toolkit can also be used for blocking of uni-processor code, and for debugging of parallel algorithms on serial machines. An elaborate review of recent parallelization aids is presented to highlight the need for a toolkit like Charon. Some performance results of parallelizing the NAS Parallel Benchmark SP program using Charon are given, showing good scalability. Some performance results of parallelizing the NAS Parallel Benchmark SP program using Charon are given, showing good scalability.

VanderWijngarrt, Rob F.↗

SW4 Curvilinear Kernels

Five computationally expensive stencil evaluation routines from SW4(https://github.com/geodynamics/sw4 GPL license) have been extracted and packaged with a driver to create a mini-app for evaluating compiler and GPU performance. The kernels can executed on AMD and Nvidia GPUs with and without RAJA. The kernel driver generates synthetic inputs, checks for correctness and measures kernel run times.

Pankajakshan, Ramesh↗

A sixth order Mehrstellen scheme with an application to the Method of Local Corrections for the 3D Poisson equation

We present a sixth order finite difference scheme for Poisson’s equation when discretized with the compact 27-point stencil based on Mehrstellen corrections of the forcing function term f. Our approach results in a sixth order accurate solution error as opposed to a fourth-order error imposed by the classical Mehrstellen correction for the 19-point and 27-point stencils. The present study is a continuation of former work of Spotz and Carey (1996) on compact finite difference schemes for Poisson’s equation where sixth order convergence may be obtained under the assumption that the fourth order derivatives of f are determined analytically. Specifically, we show that sixth order convergence can still be attained when only values of f at grid points are available. The sixth order Mehrstellen scheme is further coupled with a Method of Local Corrections (MLC) 3D Poisson solver improving to sixth order accuracy the results reported in Kavouklis and Colella (2019). The MLC test case considered involves an adaptive grid that comprises 7.5 billion cells.

97 MATHEMATICS AND COMPUTING↗

High-order limiting methods using maximum principle bounds derived from the Boltzmann equation I: Euler equations

The use of limiting methods for high-order numerical approximations of hyperbolic conservation laws generally requires defining an admissible region/bounds for the solution. In this work, we present a novel approach for computing solution bounds and limiting for the Euler equations through the kinetic representation provided by the Boltzmann equation, which allows for extending limiters designed for linear advection directly to the Euler equations. Given an arbitrary set of solution values to compute bounds over (e.g., numerical stencil) and a desired linear advection limiter, the proposed approach yields an analytic expression for the admissible region of particle distribution function values, which may be numerically integrated to yield a set of bounds for the density, momentum, and total energy. Further, these solution bounds are shown to preserve positivity of density/pressure/internal energy and, when paired with a limiting technique, can robustly resolve strong discontinuities while recovering high-order accuracy in smooth regions without any ad hoc corrections (e.g., relaxing the bounds). This approach is demonstrated in the context of an explicit unstructured high-order discontinuous Galerkin/flux reconstruction scheme for a variety of difficult problems in gas dynamics, including cases with extreme shocks and shock-vortex interactions. Furthermore, this work presents a foundation for limiting techniques for more complex macroscopic governing equations that can be derived from an underlying kinetic representation for which admissible solution bounds are not well-understood.

42 ENGINEERING↗

Revisiting Temporal Blocking Stencil Optimizations

Iterative stencils are used widely across the spectrum of High Performance Computing (HPC) applications. Many efforts have been put into optimizing stencil GPU kernels, given the prevalence of GPU-accelerated supercomputers. To improve the data locality, temporal blocking is an optimization that combines a batch of time steps to process them together. Under the observation that GPUs are evolving to resemble CPUs in some aspects, we revisit temporal blocking optimizations for GPUs. We explore how temporal blocking schemes can be adapted to the new features in the recent Nvidia GPUs, including large scratchpad memory, hardware prefetching, and device-wide synchronization. We propose a novel temporal blocking method, EBISU, which champions low device occupancy to drive aggressive deep temporal blocking on large tiles that are executed tile-by-tile. We compare EBISU with state-of-the-art temporal blocking libraries: STENCILGEN and AN5D. We also compare with state-of-the-art stencil auto-tuning tools that are equipped with temporal blocking optimizations: ARTEMIS and DRSTENCIL. Over a wide range of stencil benchmarks, EBISU achieves speedups up to 2.53x and a geometric mean speedup of 1.49x over the best state-of-the-art performance in each stencil benchmark.

Zhang, Lingqi↗

Edge Based Viscous Method for Node-Centered Formulations

This paper presents a novel, efficient, conservative, edge-based method for evaluation of mean flow viscous fluxes and turbulence-model diffusion terms of the Reynolds-averaged Navier-Stokes equations on tetrahedral grids. The new method is implemented in a practical, node-centered, finite-volume computational fluid dynamics solver. The baseline finite-volume scheme that is equivalent to a second-order accurate finite-element Galerkin approximation of viscous stresses is reformulated. The order of operations to compute the cell-based Green-Gauss gradients is changed to combine the operations by edge, which leads to an equivalent formulation on tetrahedral grids, improves efficiency, and preserves the compact discretization stencil based on the nearest neighbors. The computational results presented in this paper verify the implementation of this edge-based method by comparing its accuracy and iterative convergence with those of the well verified and validated baseline formulation. Efficiency gains for residual and Jacobian evaluations result in significant reduction of time to solution. This novel edge-based formulation on tetrahedra can be seamlessly combined with the baseline formulation on cells of other types for computing solutions on mixed-element grids.

Edge Based↗

Optimal local truncation error method for 3-D elasticity interface problems

The paper deals with a new effective numerical technique on unfitted Cartesian meshes for simulations of heterogeneous elastic materials. Here, we develop the optimal local truncation error method (OLTEM) with 27- point stencils (similar to those for linear finite elements) for the 3-D time-independent elasticity equations with irregular interfaces. Only displacement unknowns at each internal Cartesian grid point are used. The interface conditions are added to the expression for the local truncation error and do not change the width of the stencils. The unknown stencil coefficients are calculated by the minimization of the local truncation error of the stencil equations and yield the optimal second order of accuracy for OLTEM with the 27-point stencils on unfitted Cartesian meshes. A new post-processing procedure for accurate stress calculations has been developed. Similar to basic computations it uses OLTEM with the 27-point stencils and the elasticity equations. The post-processing procedure can be easily extended to unstructured meshes and can be independently used with existing numerical techniques (e.g., with finite elements). Numerical experiments show that at an accuracy of 0.1% for stresses, OLTEM with the new post-processing procedure significantly (by 10 5 -10 9 times) reduces the number of degrees of freedom compared to linear finite elements. OLTEM with the 27-point stencils yields even more accurate results than high-order finite elements with wider stencils.

42 ENGINEERING↗

Large Eddy Simulation (LES) of Particle-Laden Temporal Mixing Layers

High-fidelity models of plume-regolith interaction are difficult to develop because of the widely disparate flow conditions that exist in this process. The gas in the core of a rocket plume can often be modeled as a time-dependent, high-temperature, turbulent, reacting continuum flow. However, due to the vacuum conditions on the lunar surface, the mean molecular path in the outer parts of the plume is too long for the continuum assumption to remain valid. Molecular methods are better suited to model this region of the flow. Finally, granular and multiphase flow models must be employed to describe the dust and debris that are displaced from the surface, as well as how a crater is formed in the regolith. At present, standard commercial CFD (computational fluid dynamics) software is not capable of coupling each of these flow regimes to provide an accurate representation of this flow process, necessitating the development of custom software. This software solves the fluid-flow-governing equations in an Eulerian framework, coupled with the particle transport equations that are solved in a Lagrangian framework. It uses a fourth-order explicit Runge-Kutta scheme for temporal integration, an eighth-order central finite differencing scheme for spatial discretization. The non-linear terms in the governing equations are recast in cubic skew symmetric form to reduce aliasing error. The second derivative viscous terms are computed using eighth-order narrow stencils that provide better diffusion for the highest resolved wave numbers. A fourth-order Lagrange interpolation procedure is used to obtain gas-phase variable values at the particle locations.

Bellan, Josette↗

11-th order of accuracy for numerical solution of 3-D Poisson equation with irregular interfaces on unfitted Cartesian meshes

For the first time the optimal local truncation error method (OLTEM) with 125-point stencils and unfitted Cartesian meshes has been developed in the general 3-D case for the Poisson equation for heterogeneous materials with smooth irregular interfaces. The 125-point stencils equations that are similar to those for quadratic finite elements are used for OLTEM. The interface conditions for OLTEM are imposed as constraints at a small number of interface points and do not require the introduction of additional unknowns, i.e., the sparse structure of global discrete equations of OLTEM is the same for homogeneous and heterogeneous materials. The stencils coefficients of OLTEM are calculated by the minimization of the local truncation error of the stencil equations. These derivations include the use of the Poisson equation for the relationship between the different spatial derivatives. Such a procedure provides the maximum possible accuracy of the discrete equations of OLTEM. In contrast to known numerical techniques with quadratic elements and third order of accuracy on conforming and unfitted meshes, OLTEM with the 125-point stencils provides 11-th order of accuracy, i.e., an extremely large increase in accuracy by 8 orders for similar stencils. The numerical results show that OLTEM yields much more accurate results than high-order finite elements with much wider stencils. The increased numerical accuracy of OLTEM leads to an extremely large increase in computational efficiency. Additionally, a new post-processing procedure with the 125-point stencil has been developed for the calculation of the spatial derivatives of the primary function. The post-processing procedure includes the minimization of the local truncation error and the use of the Poisson equation. It is demonstrated that the use of the partial differential equation (PDE) for the 125-point stencils improves the accuracy of the spatial derivatives by 6 orders compared to post-processing without the use of PDE as in existing numerical techniques. At an accuracy of 0.1% for the spatial derivatives, OLTEM reduces the number of degrees of freedom by 900 - 4∙10 6 times compared to quadratic finite elements. The developed post-processing procedure can be easily extended to unstructured meshes and can be independently used with existing post-processing techniques (e.g., with finite elements).

97 MATHEMATICS AND COMPUTING↗

10-th order of accuracy for numerical solution of 3-D elasticity equations for heterogeneous materials on unfitted Cartesian meshes

We have developed the Optimal Local Truncation Error Method (OLTEM) with 10-th order of accuracy on unfitted Cartesian meshes for a system of 3-D elasticity equations with smooth irregular interfaces. 5 x 5 x 5 = 125-point stencils (similar to those for quadratic finite elements) for elastic heterogeneous materials are used for OLTEM. There are no unknowns at the interface points between different materials; the structure of the global discrete equations is the same for homogeneous and heterogeneous materials. The calculation of unknown stencil coefficients is based on the minimization of the local truncation error of the stencil equations and yields the optimal 10-th order of accuracy for OLTEM on unfitted Cartesian meshes, i.e., the increase by 7 orders in accuracy compared to quadratic finite elements on conformal meshes. A new post-processing procedure provides the 9-th order of accuracy for stresses in the 3-D case. Similar to basic computations it uses OLTEM with the 125-point stencils, the interface conditions and the elasticity equations. It was shown that the use of the elasticity equations for post-processing improves the accuracy of 0.1% stresses by 6 orders compared to post-processing without the use of PDEs. At an accuracy of for stresses, OLTEM with the new post-processing procedure reduces the number of degrees of freedom by 360 - 8000 times compared to quadratic finite elements with similar stencils. OLTEM with the 125-point stencils yields even more accurate results than high-order finite elements with much wider stencils. OLTEM provides accurate numerical results for compressible and nearly incompressible materials.

elasticity equations↗

Weighted Least-Squares Cell-Average Gradient Construction Methods for the VULCAN-CFD Second-Order Accurate Unstructured-Grid Cell-Centered Finite-Volume Solver

The ability to solve the equations governing the hypersonic turbulent flow of a real gas on unstructured grids using a spatially-elliptic, 2nd-order accurate, cell-centered, finite-volume method has been recently implemented in the VULCAN-CFD code. The construction of cell-average gradients using a weighted linear least-squares method and the use of these gradients in the construction of the inviscid fluxes is the focus of this paper. A comparison of least-squares stencil construction methodologies is presented and approaches to augment the number of cells participating in the stencil while preserving accuracy are explored. Due to our interest in hypersonic flow, a robust multidimensional cell-average gradient limiter procedure that is consistent with the stencil used to construct the cell-average gradients is described and investigated. Canonical problems are computed to illustrate the challenges and investigate the accuracy, robustness and convergence behavior of the cell-average gradient methods on unstructured cell-centered finite-volume grids. Finally, thermally perfect, chemically frozen, Mach 8 turbulent flow of air around a blunt wedge is computed to demonstrate the robustness and convergence behavior of the new method for constructing stencils of use in a weighted linear least-squares gradient method for a hypersonic flow.

White, Jeffery A.↗