Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Code”

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 757 records · Page 42

Helium: lifting high-performance stencil kernels from stripped x86 binaries to halide DSL code

Highly optimized programs are prone to bit rot, where performance quickly becomes suboptimal in the face of new hardware and compiler techniques. In this paper we show how to automatically lift performance-critical stencil kernels from a stripped x86 binary and generate the corresponding code in the high-level domain-specific language Halide. Using Halide's state-of-the-art optimizations targeting current hardware, we show that new optimized versions of these kernels can replace the originals to rejuvenate the application for newer hardware. The original optimized code for kernels in stripped binaries is nearly impossible to analyze statically. Instead, we rely on dynamic traces to regenerate the kernels. We perform buffer structure reconstruction to identify input, intermediate and output buffer shapes. Here, we abstract from a forest of concrete dependency trees which contain absolute memory addresses to symbolic trees suitable for high-level code generation. This is done by canonicalizing trees, clustering them based on structure, inferring higher-dimensional buffer accesses and finally by solving a set of linear equations based on buffer accesses to lift them up to simple, high-level expressions. Helium can handle highly optimized, complex stencil kernels with input-dependent conditionals. We lift seven kernels from Adobe Photoshop giving a 75 % performance improvement, four kernels from Irfan View, leading to 4.97 x performance, and one stencil from the mini GMG multigrid benchmark netting a 4.25 x improvement in performance. We manually rejuvenated Photoshop by replacing eleven of Photoshop's filters with our lifted implementations, giving 1.12 x speedup without affecting the user experience.

97 MATHEMATICS AND COMPUTING↗

GPU code optimization using abstract kernel emulation and sensitivity analysis

In this paper, we develop a novel approach to GPU kernel optimization by focusing on identification of bottleneck resources and determining optimization parameters that can alleviate the bottleneck. Performance modeling for GPUs is done by abstract kernel emulation along with latency/gap modeling of resources. Sensitivity analysis with respect to resource latency/gap parameters is used to predict the bottleneck resource for a given kernel's execution. Here, the utility of the bottleneck analysis is demonstrated in two contexts: 1) Enhancing the OpenTuner auto-tuner with the new bottleneck-driven optimization strategy. Experimental results on all kernels from the Rodinia suite and GPU tensor contraction kernels from the NWChem computational chemistry suite demonstrate effectiveness. 2) Manual code optimization: two case studies illustrate the use of the bottleneck analysis to iteratively improve performance of code from state-of-the-art DSL code generators.

97 MATHEMATICS AND COMPUTING↗

Optimization and Portability of a Fusion OpenACC-based FORTRAN HPC Code from NVIDIA to AMD GPUs

NVIDIA has been the main provider of GPU hardware in HPC systems for over a decade. Most applications that benefit from GPUs have thus been developed and optimized for the NVIDIA software stack. Recent exascale HPC systems are, however, introducing GPUs from other vendors, e.g. with the AMD GPU-based OLCF Frontier system just becoming available. AMD GPUs cannot be directly accessed using the NVIDIA software stack, and require a porting effort by the application developers. This paper provides an overview of our experience porting and optimizing the CGYRO code, a widely-used fusion simulation tool based on FORTRAN with OpenACC-based GPU acceleration. While the porting from the NVIDIA compilers was relatively straightforward using the CRAY compilers on the AMD systems, the performance optimization required more fine-tuning. In the optimization effort, we uncovered code sections that had performed well on NVIDIA GPUs, but were unexpectedly slow on AMD GPUs. After AMD-targeted code optimizations, performance on AMD GPUs has increased to meet our expectations. Modest speed improvements were also seen on NVIDIA GPUs, which was an unexpected benefit of this exercise.

Sfiligoi, Igor↗

Performance-Portable GPU Acceleration of the EFIT Tokamak Plasma Equilibrium Reconstruction Code

This paper presents the steps followed to GPU-offload parts of the core solver of EFIT-AI, an equilibrium reconstruction code suitable for tokamak experiments and burning plasmas. For this work, we will focus on the fitting procedure that consists of a Grad–Shafranov (GS) equation inverse solver that calculates equilibrium reconstructions on a grid. We will show profiling results of the original code (CPU-baseline), as well as the directives used to GPU-offload the most time-consuming function, initially to compare OpenACC and OpenMP on NVIDIA and AMD GPUs and later on to assess OpenMP performance portability on NVIDIA, AMD and Intel GPUs. We will make a performance comparison for different spatial grid sizes and show the speedup achieved on NVIDIA A100 (Perlmutter-NERSC), AMD MI250X (Frontier-OLCF) and Intel PVC GPUs (Sunspot-ALCF). Finally, we will draw some conclusions and recommendations to achieve high-performance portability for an equilibrium reconstruction code on the new HPC architectures

GPU↗

Porting a 3D seismic modeling code (SW4) to CORAL machines

Seismic waves fourth order (SW4) solves the seismic wave equations on Cartesian and curvilinear grids using large compute clusters with O (100,000) cores. In this article we discuss the porting of SW4 to run on the CORAL architecture using the RAJA performance portability abstraction layer. The performances of key kernels using RAJA and CUDA are compared to estimate the performance penalty of using the portability abstraction layer. Code changes required for efficiency on GPUs and minimizing time spent in Message Passing Interface (MPI) are discussed. This article describes a path for efficiently porting large code bases to GPU-based machines while avoiding the pitfalls of a new architecture in the early stages of its deployment. Current bottlenecks in the code are discussed along with possible architectural or software mitigations. SW4 runs 28× faster on one 4-GPU CORAL node than on a CTS-1 node (Dual Intel Xeon E5-2695 v4). SW4 is now in routine use on problems of unprecedented resolution (203 billion grid points) and scale on 1,200 nodes of Summit.

97 MATHEMATICS AND COMPUTING↗

Verification of the global gyrokinetic stellarator code XGC-S for linear ion temperature gradient driven modes

XGC (X-point Gyrokinetic Code) is a whole-volume, total-f gyrokinetic particle-in-cell code developed for modelling tokamaks.In recent work, XGC has been extended to model more general 3D toroidal magnetic configurations, such as stellarators.These improvements have resulted in the XGC-S version.In this paper, XGC-S is benchmarked in the reduced delta-f limit for linear electrostatic ion temperature gradient-driven microinstabilities, which can underlie turbulent transport in stellarators.An initial benchmark of XGC-S in tokamak geometry shows good agreement with the XGC1, ORB5, and global GENE codes.A benchmark between XGC-S and the EUTERPE global gyrokinetic code for stellarators has also been performed, this time in geometry of the optimised stellarator Wendelstein 7-X.Good agreement has been found for the mode number spectrum, mode structure, and growth rate.

M, Cole↗

OpenMP 4.5 and CUDA C++ and FORTRAN code samples

Brief Description for Public Release: A collection of general code samples demonstrating issues encountered with using OpenMP4.5 (and some CUDA) during efforts to port codes to a GPU platform using IBM XL. These independent examples include both C++ and FORTRAN language usage, along with attempts to use OpenMP and CUDA in an interoperable manner. This suite of code samples is meant to supplement the examples provided by openmp.org at https://github.com/OpenMP/Examples, especially in regards to FORTRAN language support and OpenMP/CUDA interoperability.

Black, AaronC.↗

H2OI95: A Stand-Alone Fortran Code for Evaluating the IAPWS-95 Equation-of-State Model for Water

H2OI95 is a stand-alone Fortran code for evaluating the IAPWS-95 equation-of-state model (Wagner and Pruss, 2002) for the thermodynamic properties of water. It further evaluates the corresponding thermochemical properties of water consistent with the CODATA recommendations (Cox et al., 1989). The IAPWS-95 model is based on a model equation for the dimensionless Helmholtz energy for which the primary variables are the inverse reduced temperature and reduced density. Here is the absolute temperature (K), is density (kg/m3), and the subscript refers to the critical point of water (647.096 K and 22.064 MPa pressure in this model, for which is 322 kg/m3). The code solves four basic types of problems, distinguished by the specified inputs: 1, Temperature (K) and density (kg/m3) or reduced density 2. Temperature (K) and pressure (MPa). 3. Temperature (K) on the saturation (liquid-vapor equilibrium) curve 4. Pressure (MPa) on the saturation curve Each type of problem is run using a corresponding input (text) file. All but the first type of problem require iteration. For example, to solve for desired temperature and pressure, the reduced density must be adjusted to give the desired pressure. Iteration is accomplished using the Newton-Raphson method, though the secant method is also used in solving the fourth type of problem. H2OI95 has been used to conduct numerical studies of convergence and the problem of multiple numerical solutions, only some of which correspond to valid results. Obtaining valid results depends mainly on appropriate choice of starting values. The default values in H2OI95 appear to consistently lead to generally desired results. With modification (not addressed here), H2OI95 can be used to support SUPCRT92 (Johnson et al., 1992) and similar codes that compute chemical thermodynamic properties of species and reactions over a wide range of temperature and pressure (273.16-1273K and 0-1000 MPa).

Wolery, ThomasJ.↗

CSlib, a library to couple codes via Client/Server messaging

The CSlib is a small, portable library which enables two (or more) independent simulation codes to be coupled, by exchanging messages with each other. Both codes link to the library when they are built, and can them communicate with each other as they run. The messages contain data or instructions that the two codes send back-and-forth to each other. The messaging can take place via files, sockets, or MPI. The latter is a standard distributed-memory message-passing library.

Plimpton, Steve↗

Computation of graph hitting time moments; Chapel code implementation.

The project that developed this is unclassified, with the mandate to produce open source code. This code computes the hitting time moments of a graph using a linear algebra configuration. The goal of this work is to explore the performance capabilities of the Chapel programming language. Toward that end, we generate random adjacency matrices which represent a random graph. The code can also read in an adjacency matrix from a file. The main computation is the Conjugate Gradient method.SAND2020-12651 M. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Barrett, Richard↗

Yet Another Hauser-Feshbach Code

Code framework to perform simulations of nuclear reactions with incident particles including gammas, protons, neutrons, deuterons, tritons, helium-3, and alphas to develop nuclear data libraries and study nuclear reaction phenomona. The code can model nuclear reactions or initial populations specified by the user. The decays principally follow the compound-nucleus hypothesis and the statistical decay of Hauser and Feshbach. The code models nuclear decays with a Monte Carlo process that tracks the decay of each state. Data libraries are produced that can be translated into GNDS (generalized Nuclear Data Structure). YAHFC can also be used as an event generator, with individual decays written to disk for offline analysis. Both serial and MPI versions are provided. YAHFC does NOT perform transport of nuclear reactions through materials, only the primary reaction with a target material.

Ormand, WilliamE.↗

Code for paper "Reconstructing an Implosion with Space-Time Smoothing of Velocimetry Traces"

New diagnostics to obtain high-temporal resolution observation of surface velocity provide a rich collection of data from high-explosive (HE) experiments. Using this data to estimate the temporal evolution of an imploding, HE-driven surface is of great interest for validating simulation of the physical system and for design of future experiments. This is the code for a paper in which we propose a method for using a Gaussian process to estimate the surface position over time and provide uncertainty estimates on that reconstruction accounting for measurement error, uncertainty to sparse spatial sampling velocity data, and robustness to outlying observations. In the paper, the code is applied on data from a hemispherical HE implosion experiment. This code is for release with the paper for peer-review, replicating the results and making the figures from the paper.

Grosskopf, Michael↗

ILI Code

This R code consists of three scripts, described below. 1. ILI_LHC_sample.R The first script generate 10,000 samples from the total parameter space formed by the ranges of the following five parameters inputted into the ILI model: transmission rate (beta), per capita rate of progress from exposed to infectious state (gamma_1), per capita rate of progress through initial infectious state (gamma_2), per capita rate of progress through hospitalized state (gamma_3), and per capita rate of progress through non-hospitalized infectious state (gamma_4). The output is LHS_samples.csv, for input into the global sensitivity script, ILI_SEIR. 2. ILI_SEIR.R The second script solves a standard Susceptible-Exposed-Infected- Recovered (SEIR) model (a system of Ordinary Differential Equations (ODEs)), runs global sensitivity analyses, and generates plots showing the impact of the input variables on the response variables for each virus. 3. virus_sims.R The third script solves a standard Susceptible-Exposed-Infected- Recovered (SEIR) model (a system of Ordinary Differential Equations (ODEs)), aimed at modeling outbreaks for five common upper respiratory viruses within a contained population. The output of this code is an epidemic curve to show timing and magnitude of the epidemic peak for each virus. Note: for all three scripts, the parameter values must be hard-coded by the user or the output will not be accurate.

Spencer, Julie↗

Viscoplastic selfconsistent (VPSC) code (version 8, open source)

VPSC is a mean-field polycrystal plasticity code for the prediction of the mechanical response and microstructure evolution of polycrystalline aggregates. The VPSC code is the computational realization of the visco-plastic self-consistent theory of polycrystal deformation. Both the theory and details of its numerical implementation were originally reported by R.A. Lebensohn and C.N. Tomé: "A self-consistent approach for the simulation of plastic deformation and texture development of polycrystals: application to Zirconium alloys", Acta Metallurgica et Materialia 41, 2611 (1993). Since then, the VPSC code has experienced several improvements and extensions and it is nowadays extensively used to simulate plastic deformation of polycrystalline aggregates and to interpret experimental evidence on metals, minerals and polymers.

Lebensohn, Ricardo↗

Phase-Field Method Tutorial Codes

This repository contains example implementations of phase-field codes primarily for educational purposes. These codes demonstrate how a simple phase-field models can be implemented as an introduction for researchers new to the area (students, new staff, collaborators from different domains, etc.). The computer code includes highly documented Jupyter notebooks that implement phase-field models and analyze the results.

DeWitt, Stephen [Oak Ridge National Laboratory (@O↗

Code for Experiment in Publication “Sensitivity Analysis in the Presence of Intrinsic Stochasticity for Discrete Fracture Network Simulations”

Following the Open Research requirements for AGU journals, we must release the code used to perform the experiment described in our recent publication, posted at (https://arxiv.org/abs/2312.04722). This code fits a joint emulator to data from a Discrete Fracture Network (DFN) simulation, performed using the open-source software DFNworks (https://dfnworks.lanl.gov/). All code to be released implements existing methods; there are no novel algorithms nor any major innovations to existing software.

Murph, Alexander↗

Band Bending/Contact Resistivity Codes v. 1

Code #1 solves the one-dimensional Poisson equation and outputs the band bending poteatial near a metal-semiconductor interface. Code #2 uses the output of code #1 and calculates the contact resistivity of the interface.

Spataru, Dan↗