Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “stencil programs”

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.

FPDetect: Efficient Reasoning About Stencil Programs Using Selective Direct Evaluation

We present FPDetect, a low-overhead approach for detecting logical errors and soft errors affecting stencil computations without generating false positives. We develop an offline analysis that tightly estimates the number of floating-point bits preserved across stencil applications. This estimate rigorously bounds the values expected in the data space of the computation. Violations of this bound can be attributed with certainty to errors. FPDetect helps synthesize error detectors customized for user-specified levels of accuracy and coverage. FPDetect also enables overhead reduction techniques based on deploying these detectors coarsely in space and time. Experimental evaluations demonstrate the practicality of our approach.

97 MATHEMATICS AND COMPUTING↗

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↗

Application of traditional CFD methods to nonlinear computational aeroacoustics problems

This paper describes an implementation of a high order finite difference technique and its application to the category 2 problems of the ICASE/LaRC Workshop on Computational Aeroacoustics (CAA). Essentially, a popular Computational Fluid Dynamics (CFD) approach (central differencing, Runge-Kutta time integration and artificial dissipation) is modified to handle aeroacoustic problems. The changes include increasing the order of the spatial differencing to sixth order and modifying the artificial dissipation so that it does not significantly contaminate the wave solution. All of the results were obtained from the CM5 located at the Numerical Aerodynamic Simulation Laboratory. lt was coded in CMFortran (very similar to HPF), using programming techniques developed for communication intensive large stencils, and ran very efficiently.

Chyczewski, Thomas S.↗

Evaluation of OpenAI Codex for HPC Parallel Programming Models Kernel Generation

We evaluate AI-assisted generative capabilities on fundamental numerical kernels in high-performance computing (HPC), including AXPY, GEMV, GEMM, SpMV, Jacobi Stencil, and CG. We test the generated kernel codes for a variety of language-supported programming models, including (1) C++ (e.g., OpenMP [including offload], OpenACC, Kokkos, SyCL, CUDA, and HIP), (2) Fortran (e.g., OpenMP [including offload] and OpenACC), (3) Python (e.g., numpy, Numba, cuPy, and pyCUDA), and (4) Julia (e.g., Threads, CUDA.jl, AMDGPU.jl, and KernelAbstractions.jl). We use the GitHub Copilot capabilities powered by the GPT-based OpenAI Codex available in Visual Studio Code as of April 2023 to generate a vast amount of implementations given simple + + prompt variants. To quantify and compare the results, we propose a proficiency metric around the initial 10 suggestions given for each prompt. Results suggest that the OpenAI Codex outputs for C++ correlate with the adoption and maturity of programming models. For example, OpenMP and CUDA score really high, whereas HIP is still lacking. We found that prompts from either a targeted language such as Fortran or the more general purpose Python can benefit from adding code keywords, while Julia prompts perform acceptably well for its mature programming models (e.g., Threads and CUDA.jl). We expect for these benchmarks to provide a point of reference for each programming model's community. Overall, understanding the convergence of large language models, AI, and HPC is crucial due to its rapidly evolving nature and how it is redefining human-computer interactions.

Godoy, William↗

Mojo: MLIR-based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem

We explore the performance and portability of the novel Mojo language for scientific computing workloads on GPUs. As the first language based on the LLVM’s Multi-Level Intermediate Representation (MLIR) compiler infrastructure, Mojo aims to close performance and productivity gaps by combining Python’s interoperability and CUDA-like syntax for compile-time portable GPU programming. We target four scientific workloads: a seven-point stencil (memory-bound), BabelStream (memory-bound), miniBUDE (compute-bound), and Hartree–Fock (compute-bound with atomic operations); and compare their performance against vendor baselines on NVIDIA H100 and AMD MI300A GPUs. We show that Mojo’s performance is competitive with CUDA and HIP for memory-bound kernels, whereas gaps exist on AMD GPUs for atomic operations and for fast-math compute-bound kernels on both AMD and NVIDIA GPUs. Although the learning curve and programming requirements are still fairly low-level, Mojo can close significant gaps in the fragmented Python ecosystem in the convergence of scientific computing and AI.

Godoy, William [ORNL] (ORCID:0000000225905178)↗

A MultiGPU Performance-Portable Solution for Array Programming Based on Kokkos

Today, multiGPU nodes are widely used in high-performance computing and data centers. However, current programming models do not provide simple, transparent, and portable support for automatically targeting multiple GPUs within a node on application areas of array programming. In this paper, we describe a new application programming interface based on the Kokkos programming model to enable array computation on multiple GPUs in a transparent and portable way across both NVIDIA and AMD GPUs. We implement different variations of this technique to accommodate the exchange of stencils (array boundaries) among different GPU memory spaces, and we provide autotuning to select the proper number of GPUs, depending on the computational cost of the operations to be computed on arrays, that is completely transparent to the programmer. We evaluate our multiGPU extension on Summit (#5 TOP500), with six NVIDIA V100 Volta GPUs per node, and Crusher that contains identical hardware/software as Frontier (#1 TOP500), with four AMD MI250X GPUs, each with 2 Graphics Compute Dies (GCDs)for a total of 8 GCDs per node. We also compare the performance of this solution against the use of MPI + Kokkos, which is the cur-rent de facto solution for multiple GPUs in Kokkos. Our evaluation shows that the new Kokkos solution provides good scalability for many GPUs and a faster and simpler solution (from a programming productivity perspective) than MPI + Kokkos.

Valero Lara, Pedro↗

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.↗

Regional surrogates for predictive control of digital twins

Digital twins of complex systems must involve a model that is fast, generalizable, and usable for real-time control. For example, high-fidelity nonlinear multiphysics simulations can capture laser-material interactions, but are too slow for optimization or model predictive control (MPC). Reduced-order models, used to accelerate such computation, frequently fail to generalize to unseen inputs or control states. We show theoretically that this failure is intrinsic, i.e., that a learned model is non-unique outside the sampled subspace when its low-rank structure arises from limited excitation and clustered eigenvalues, rather than from a user-imposed truncation alone. Motivated by this result, we propose a control-ready regional surrogate-construction framework for both autonomous and nonautonomous dynamics; it employs Koopman lifting to represent nonlinearities, while preserving spatial locality. We illustrate our approach by constructing a control-ready surrogate for the digital twin of a thermal component of additive-manufacturing process. Our surrogate, localized in space through a von Neumann stencil, is learned from noisy high-fidelity simulations that emulate thermal-camera images collected during the manufacturing. It is linear in thermo-physically augmented states so that MPC reduces to a convex quadratic program. The surrogate requires no online correction, generalizes to unseen scan paths and power profiles of the laser, and is more than three orders of magnitude faster than a finite-difference solver. Furthermore, when the MPC sequence computed on the digital twin is applied to this solver, closed-loop temperature regulation is recovered, showing that the surrogate preserves control-relevant input-output behavior.

Data-driven model↗

Elliptic grid generation with orthogonality and spacing control on an arbitrary number of boundaries

A procedure for the generation of two and quasi-three-dimensional grids with control of orthogonality and spacing with respect to any and/or all boundaries of the domain is described. The elliptic grid generation equations of Thompson are solved implicitly. Control of the grid behavior is achieved through the introduction of forcing functions terms in the manner of Steger and Sorenson or in a modification of the method of Hilgenstock. The forcing function terms are constructed on the boundaries and propagated into the domain using transfinite Lagrangian bivariate interpolation. An anisotropic transfinite stencil is introduced and is shown to produce excellent grid behavior particularly in the vicinity of corner singularities. Emphasis is placed on the generation of viscous grids and the method is shown to be suited for use in the generation of grids for internal as well as external flow geometries. A FORTRAN program named PISCES has been written to implement the algorithm. Examples of grids for internal and external flows are given that highlight the characteristics and behavior of the algorithm.

White, J. A.↗

GPU Implementation of the OVERFLOW CFD Code

The high-performance computing (HPC) landscape is quickly changing to systems where most of the performance comes from specialized chips, specifically graphics processing units (GPUs). Such GPU systems are throughput machines, where efficient use of the GPU often requires code refactoring to expose a few orders of magnitude more fine grain parallelism than was previously used on the CPU. Recent modifications to OVERFLOW, an overset, structured grid, computational fluid dynamics flow solver, written in Fortran will be presented. These modifications include both code modernization efforts and algorithmic changes to enable OVERFLOW to efficiently utilize GPUs. Many of these algorithmic changes would likely also be applicable for other structured grid, stencil-based codes wanting to utilize GPUs. The capabilities that have been ported to run on the GPUs are presented, along with the performance gains of the GPU version relative the CPU version of OVERFLOW.

GPU Programming↗

GPU Implementation of the OVERFLOW CFD Code

The high-performance computing (HPC) landscape is quickly changing to systems where most of the performance comes from specialized chips, specifically graphics processing units (GPUs). Such GPU systems are throughput machines, where efficient use of the GPU often requires code refactoring to expose a few orders of magnitude more fine grain parallelism than was previously used on the CPU. Recent modifications to OVERFLOW, an overset, structured grid, computational fluid dynamics flow solver, written in Fortran will be presented. These modifications include both code modernization efforts and algorithmic changes to enable OVERFLOW to efficiently utilize GPUs. Many of these algorithmic changes would likely also be applicable for other structured grid, stencil-based codes wanting to utilize GPUs. The capabilities that have been ported to run on the GPUs are presented, along with the performance gains of the GPU version relative the CPU version of OVERFLOW.

GPU Programming↗

Recent Updates to the Object Reentry Survival Analysis Tool (ORSAT) Version 7.1

The Object Reentry Survival Analysis Tool (ORSAT) code is maintained and used by the NASA Orbital Debris Program Office (ODPO) and has been under continuous development and improvement since the mid-1990s. ORSAT is an object-oriented reentry simulation tool; it models a satellite as a collection of discrete components that follow independent trajectories upon the breakup of the parent object. Version 7.1 of the tool incorporates five years of new thermal and aerodynamic model development, multi-processor parametric study capability, codebase upgrades, and numerous bug-fixes. The thermal demise model was completely rewritten using a forward-time/central-space numerical stencil and incorporating a new pyrolysis model for fiber-reinforced plastic (FRP) materials. New aerodynamic and aeroheating models for hollow cylinders and hollow square prisms were developed using a combination of flow simulations in the direct simulation Monte Carlo (DSMC) Analysis Code (DAC) and Data Parallel Line Relaxation (DPLR) code and free-flight tests in the University of Texas at San Antonio’s Hypersonic Wind Tunnel. The latest version also incorporates a mechanical, strength-based demise model for FRP materials. Minor improvements include an update to the Fortran 2018 codebase; improved integration and speed with the Python-based, multi-core, parametric study tool, AutoORSAT; and fixes for many minor bugs. This new version of ORSAT will enable more accurate reentry risk assessments for modern satellites. This paper presents an overview of these changes and a summary of the verification and validation performed on the final code.

Benton R. Greene↗

Recent Updates to the Object Reentry Survival Analysis Tool (ORSAT) Version 7.1

The Object Reentry Survival Analysis Tool (ORSAT) code is maintained and used by the NASA Orbital Debris Program Office (ODPO) and has been under continuous development and improvement since the mid-1990s. ORSAT is an object-oriented reentry simulation tool; it models a satellite as a collection of discrete components that follow independent trajectories upon the breakup of the parent object. Version 7.1 of the tool incorporates five years of new thermal and aerodynamic model development, multi-processor parametric study capability, codebase upgrades, and numerous bug-fixes. The thermal demise model was completely rewritten using a forward-time/central-space numerical stencil and incorporating a new pyrolysis model for fiber-reinforced plastic (FRP) materials. New aerodynamic and aeroheating models for hollow cylinders and hollow square prisms were developed using a combination of flow simulations in the direct simulation Monte Carlo (DSMC) Analysis Code (DAC) and Data Parallel Line Relaxation (DPLR) code and free-flight tests in the University of Texas at San Antonio’s Hypersonic Wind Tunnel. The latest version also incorporates a mechanical, strength-based demise model for FRP materials. Minor improvements include an update to the Fortran 2018 codebase; improved integration and speed with the Python-based, multi-core, parametric study tool, AutoORSAT; and fixes for many minor bugs. This new version of ORSAT will enable more accurate reentry risk assessments for modern satellites. This paper presents an overview of these changes and a summary of the verification and validation performed on the final code.

Benton R. Greene↗

Large language model evaluation for high–performance computing software development

We apply AI-assisted large language model (LLM) capabilities of GPT-3 targeting high-performance computing (HPC) kernels for (i) code generation, and (ii) auto-parallelization of serial code in C ++, Fortran, Python and Julia. Our scope includes the following fundamental numerical kernels: AXPY, GEMV, GEMM, SpMV, Jacobi Stencil, and CG, and language/programming models: (1) C++ (e.g., OpenMP [including offload], OpenACC, Kokkos, SyCL, CUDA, and HIP), (2) Fortran (e.g., OpenMP [including offload] and OpenACC), (3) Python (e.g., numpy, Numba, cuPy, and pyCUDA), and (4) Julia (e.g., Threads, CUDA.jl, AMDGPU.jl, and KernelAbstractions.jl). Kernel implementations are generated using GitHub Copilot capabilities powered by the GPT-based OpenAI Codex available in Visual Studio Code given simple + + prompt variants. To quantify and compare the generated results, we propose a proficiency metric around the initial 10 suggestions given for each prompt. For auto-parallelization, we use ChatGPT interactively giving simple prompts as in a dialogue with another human including simple “prompt engineering” follow ups. Results suggest that correct outputs for C++ correlate with the adoption and maturity of programming models. For example, OpenMP and CUDA score really high, whereas HIP is still lacking. We found that prompts from either a targeted language such as Fortran or the more general-purpose Python can benefit from adding language keywords, while Julia prompts perform acceptably well for its Threads and CUDA.jl programming models. Finally, we expect to provide an initial quantifiable point of reference for code generation in each programming model using a state-of-the-art LLM. Overall, understanding the convergence of LLMs, AI, and HPC is crucial due to its rapidly evolving nature and how it is redefining human-computer interactions.

97 MATHEMATICS AND COMPUTING↗