Search NASA⌕ Search

SEARCH · Search NASA

Results for “code generation”

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 145 records · Page 8

Near-field models and simulations of pellet ablation in tokamaks

Here, detailed numerical studies of the ablation of a single neon pellet in the plasma disruption mitigation parameter space have been performed. Simulations were carried out using FronTier, a hydrodynamic/low magnetic Reynolds number MHD code with explicit tracking of material interfaces. FronTier's physics models resolve the pellet surface ablation and the formation of a dense, cold cloud of ablated material, the deposition of energy from hot plasma electrons, the expansion of the ablation cloud along magnetic field lines, and the radiation losses. A local thermodynamic equilibrium model based on Saha equations has been used to resolve atomic processes in the cloud and Redlich–Kwong corrections to the ideal gas equation of state for cold and dense gases, which have been used near the pellet surface. The FronTier pellet code is a next generation of the code described. It has been validated against the semi-analytic improved neutral gas shielding model in the 1D spherically symmetric approximation. Main results include quantification of the influence of atomic processes and Redlich–Kwong corrections on the pellet ablation in spherically symmetric approximation and verification of analytic scaling laws in a broad range of pellet and plasma parameters. Using axially symmetric MHD simulations, the properties of ablation channels and the reduction of pellet ablation rates in magnetic fields of increasing strength have been studied. While the main emphasis has been given to neon pellets for the plasma disruption mitigation, selected results on deuterium fueling pellets have also been presented.

97 MATHEMATICS AND COMPUTING↗

Numerical Model of IProTech PIP WEC Device

iProTech PIP wave energy converter (WEC) is a slack moored, single hull device with no moving parts in the water, joints or bearings. This submission includes data of the simulation, reports, and code for the iProTech PIP (WEC) project. The organization of the data included in the provided archive is detailed below and in the data description of the archive. The data teamer-iprotech-nrel folder includes and explains matlab and python code developed to hydrodynamically model the PIP WEC device in WEC-Sim. The subfolders cover the following steps: 1) report: explanatory information on device geometry 2) pip_mesher: python code to generate mesh panels from device profile data 3) wec-sim_models: matlab code to run WEC-Sim The data uploaded is a snapshot as of 11/02/2121 of code residing in a Github repository administered by David Ogden of NREL.

16 TIDAL AND WAVE POWER↗

Investigation of Frozen Chemistry for Molten Salt Reactors (MSRs)

Understanding accident progression and the potential/conditions for fission product release from fuel is necessary to evaluate safety for any nuclear reactor system. Molten Salt Reactors (MSRs) under development need such analysis to support safety evaluations. Fission product chemistry specific to MSR concepts is a critical area that introduces distinct considerations relative to the current state-of-knowledge in reactor safety, primarily developed for water-moderated nuclear reactor systems. In Light Water Reactor (LWR) systems, it is necessary to capture the chemical interaction of fission products with the reactor evironment, containment and confinement systems. The overall effects at this point are relatively well understood for the purposes of performing safety evaluations. A key insight from LWR studies is that fission product chemical behavior can be reasonably captured by modeling approaches where the chemistry is "frozen". These modeling approaches assume that radionuclide reaction and speciation can be represented by chemical classes, each with characteristic transport behavior that is invariant under a broad range of thermochemical conditions. However, radionuclides can exhibit a range of behavior in the liquid salt-melt phase of the coolant used in MSRs. Radionuclides, salt, and the metal containment surfaces (i.e. pipes) can co-exist in dynamic equilibrium that could evolve with small system mass changes. A detailed investigation to the degree the equilibrium state can dynamically evolve with changes in the conditions of the molten salt mixture has not been previously conducted. It is currently not well understood where frozen chemistry assumptions are valid. Expanding the state-of-knowledge in this regard is relevant to better assessing the range of chemical effects that should be incorporated as part of MSR safety assessments. This investigation used the Oak Ridge Isotope GENeration (ORIGEN) module of the Standardized Computer-Analysis for Licensing Evaluation (SCALE) code to generate simulated radionuclide inventories for the MSR Experiment (MSRE) and then modeled reactor chemical speciation using the Molten Salt Thermodynamic Database – Thermochemical (MSTDB-TC) coupled with Thermochimica. The effect of composition variation during decay of fission product inventory in a molten salt over a period of 500 days prolonged post- at multiple temperatures was studied. Mass fractions for fluorine and berilium were varied in order to probe the effects of free fluorine control. Finally, speciation of fluoride reactors were showed by comparing MSRE readionuclide inventories with a FLiBe based molten salt breeder reactor (MSBR). The results showed that fission product mass change has little effect on phase mass changes and vapor pressures for fluoride species, but differ with varying carrier and fuel salt compositions. However, iodine species were found to have a vapor pressure not only dependent on temperature, but also the free fluorine potential, releasing iodine when the free fluorine potential is equal to the iodine inventory. This observation, however, arose under free fluorine potentials that are very unlikely to be realized in typical molten salt mixtures. Despite this observation, temperature was found to be the dominant parameter that drove phase change and fission product species vapor pressure. The results indicate that the current frozen chemistry approach is adequate for MSR analysis.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Simulation of Boiling Two-Phase Flow in a Helical Coil Steam Generator Using the Spectral Element Code Nek-2P

To enable the design of a light water small modular reactor, the boiling flow inside a helical coil steam generator has been simulated with the two-fluid model in Nek-2P. Nek-2P is the multiphase branch of the spectral element code Nek5000. Details of the implementation of the two-fluid model and the included closure models are discussed. The presented closure models include interactions for momentum, heat, and mass transfer between phases. Models for the drag, lift, and turbulent dispersion forces are included. The complete model is fully consistent in the limits of both phasic volume fractions approaching zero and is able to simulate flows of dispersed vapor, continuous liquid, dispersed liquid, continuous vapor, or any combination thereof. The closure models and their implementation in Nek-2P have been validated by comparing to experimental data for a boiling flow, demonstrating excellent agreement. Results from the simulation of the helical coil indicate strong phasic separation driven by the effects of buoyancy and inertia. Finally, significant differences were observed in the results compared to simulations performed using Star-CCM+, although these differences were somewhat expected.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Unified Language Frontend for Physic-Informed AI/ML

Artificial intelligence and machine learning (AI/ML) are becoming important tools for scientific modeling and simulation as in several other fields such as image analysis and natural language processing. ML techniques can leverage the computing power available in modern systems and reduce the human effort needed to configure experiments, interpret and visualize results, draw conclusions from huge quantities of raw data, and build surrogates for physics based models. Domain scientists in fields like fluid dynamics, microelectronics and chemistry can automate many of their most difficult and repetitive tasks or improve the design times by use of the faster ML-surrogates. However, modern ML and traditional scientific highperformance computing (HPC) tend to use completely different software ecosystems. While ML frameworks like PyTorch and TensorFlow provide Python APIs, most HPC applications and libraries are written in C++. Direct interoperability between the two languages is possible but is tedious and error-prone. In this work, we show that a compiler-based approach can bridge the gap between ML frameworks and scientific software with less developer effort and better efficiency. We use the MLIR (multi-level intermediate representation) ecosystem to compile a pre-trained convolutional neural network (CNN) in PyTorch to freestanding C++ source code in the Kokkos programming model. Kokkos is a programming model widely used in HPC to write portable, shared-memory parallel code that can natively target a variety of CPU and GPU architectures. Our compiler-generated source code can be directly integrated into any Kokkosbased application with no dependencies on Python or cross-language interfaces.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

A Framework for the Analysis of Compiler Optimizations

Compilers transform program source code to machine executable code. During this transformation, they perform a number of compiler optimizations to improve the performance of the generated executable code. Importantly, applying those optimizations depends on the source code structure, such as the parallel programming model used to parallelize an algorithm. Often, implementations of the same algorithm with different programming models have vastly different performance because the compiler optimized them differently. We create FAROS, a framework to structure and automate the analysis of compiler optimizations on programs. FAROS automates the building process, execution profiling, and analysis of compiler optimization of programs, through a configuration interface. It outputs compiler optimization reports to show which optimizations applied to which line of source code, leveraging compilation remarks output by the compiler. Also, FAROS supports benchmarking performance of different program versions by collecting execution time results. In this first release of FAROS, we provide a configuration file to analyze compiler optimization differences for sequential vs OpenMP compilation, including 38 programs consisting of HPC proxy/mini/large applications, and NAS and Rodina kernels for analysis.

Georgakoudis, Giorgis↗

Data-Driven Protection Software to classify fault locations by protective zone in distribution systems with high PV penetration

The software contains (a) the source codes to generate Point-on-Wave (PoW) transient data for any feeder model in Alternative Transient Program (ATP) format. Codes provide options to change different steady state settings, including the loading condition and PV capacity and transient state setting like faults type, location and initiation time (b) data post-processing source code to converted data from native format to COMTRADE, csv, HDF5 (c) Docker container to train CNN to classify fault locations by protective zone. The container takes dataset and other training parameters (sampling rate, training epochs, batch size etc) as input to train CNN. The container writes back the trained CNN model, training and testing metrics and plots to the local workstation

Ramesh, Meghana↗

ACES: Infrastructure As Code. Model Optimization and Performance Capability

Infrastructure as Code (IaC) refers to managing infrastructure (networks, physical/virtual machines, storage, and connection topology) in a descriptive model/language, rather than configuring it manually or using interactive configuration tools. Just like source code can be compiled to generate the same binary code, IaC enables generating the same environment every time it is applied. IaC is a key DevOps practice and is generally used in conjunction with continuous integration (CI) and continuous delivery (CD). In CI, all code changes are merged into a mainline branch and validated multiple times a day as developers check in their changes to the source code. In CD on the other hand, code changes are automatically packaged for a new release-to-production on a regular basis. This typically enables teams to deliver software changes much more quickly and often. Developing and managing the ACES platform using (IaC) is vital for the robust deployment and continued sustainment of this foundational computing capability. IaC and DevOps practices will help us solve many of the common challenges often encountered in developing and maintaining compute infrastructure. First, it will make the provisioning, deployment, and maintenance of the compute infrastructure across multiple environments much more efficient. Second, these processes help make the overall system much more stable by continuously testing new changes as they are introduced to the system. Third, it allows us to be much more confident of the security controls in place since they can be tested as part of the CI process and all new changes can be audited and tracked. Finally, IaC enables the ACES Platform to be adaptable to the emerging technologies due to its ability to spin up different test beds to evaluate and incorporate these technologies. This document addresses common infrastructure-management challenges, describes what happens if they are not addressed, and highlights the value of utilizing IaC to tackle them. Finally, we will provide a high-level overview of the IaC and DevOps practices being utilized by the ACES Platform team.

97 MATHEMATICS AND COMPUTING↗

Comprehensive comparison of two tracking codes for single-particle dynamics evaluation of a next-generation storage ring light source

Next-generation light sources based on the multibend achromat concept place great reliance on the accuracy of beam dynamics modeling. To ensure the success of such light sources, confirmation of design performance with at least two independent codes is prudent. The APS Upgrade (APS-U) lattice has been designed using the code ELEGANT, which has existing and new features that are needed by the design. Corresponding, independent improvements have recently been made to the accelerator toolbox (AT), in order to permit an independent check of nonlinear dynamics predictions. The new developments include the modeling of combined-function bending magnets with straight geometry and improved fringe field effects of quadrupole magnets. Calculations of linear and nonlinear lattice parameters and particle tracking results were compared, showing remarkable agreement was found between the two independently developed codes. This provides significant confirmation of the feasibility of the APS-U design.

storage ring↗

Architecture for the Performance of Nuclear Fuel Depletion Calculations

Computational analysis of the depletion of nuclear fuel is crucial to the accurate modeling of the time-dependent behavior of nuclear reactors. The reactor physics application MAMMOTH is modified to compute radioactive decay and neutron transmutation in order to model physical processes which occur within nuclear reactors as reactor fuel is burned. The ability to read decay and cross-section data files of other codes are also added and the addition of a standardized decay and transmutation XML file format for MAMMOTH, known as ISOXML. Comparisons between MAMMOTH and the Oak Ridge Isotope Generation (ORIGEN) code are performed to demonstrate the improved precision possible with MAMMOTH. In addition, several tests are run to demonstrate the ability of MAMMOTH to model decay and transmutation processes involving hundreds of isotopes. Future work will focus on solving depletion problems with multiple neutron energy groups and the implementation of predictor-corrector methods, several of which are described in this work.

07 ISOTOPE AND RADIATION SOURCES↗

Multigroup Cross-Section Generation with the OpenMC Monte Carlo Particle Transport Code

High-fidelity deterministic transport codes require highly accurate multigroup cross sections (MGXS). Monte Carlo is increasingly cited as a reactor-agnostic approach to MGXS generation since it is unconstrained by the engineering-based approximations that limit the applicability of deterministic MGXS generation tools. This paper introduces a new framework that uses the OpenMC Monte Carlo code to generate MGXS for use in multigroup transport codes. The openmc.mgxs module is built atop OpenMC's Python application programming interface to process tally data output by the OpenMC executable. This paper validates the module to generate MGXS that enable the multigroup OpenMOC transport code to compute eigenvalues to within 50 pcm and fission rates to within 1% of reference solutions for two heterogeneous pressurized water reactor benchmarks.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

MLIR loop optimizations for High-Level Synthesis: a case study

High-Level Synthesis (HLS) tools simplify the design of hardware accelerators by automatically generating Verilog/VHDL code starting from a general purpose software programming language. They include a wide range of optimization techniques in the process, most of them performed on a low-level intermediate representation (IR) of the code. Introducing optimizations on a higher level of abstraction could significantly contribute to the automated design process results; for example, polyhedral techniques for the manipulation of loops could have a significant impact on the generated accelerators when applied on a specialized IR. We use loop pipelining as a case study to explore the introduction of compiler-based transformations on top of an existing HLS process. We leverage the Multi-Level Intermediate Representation (MLIR) framework and an external scheduler to implement the required transformations, and couple them with existing HLS tools to evaluate the improvements that loop pipelining brings to the performance of generated accelerators. The proposed approach can be integrated with other high-level transformations on the MLIR representation, combining different techniques to obtain pre-optimized inputs for HLS that do not have to rely on a specific backend tool.

Curzel, Serena↗

Source-to-Source Automatic Differentiation of OpenMP Parallel Loops

This article presents our work toward correct and efficient automatic differentiation of OpenMP parallel worksharing loops in forward and reverse mode. Automatic differentiation is a method to obtain gradients of numerical programs, which are crucial in optimization, uncertainty quantification, and machine learning. The computational cost to compute gradients is a common bottleneck in practice. For applications that are parallelized for multicore CPUs or GPUs using OpenMP, one also wishes to compute the gradients in parallel. Here, we propose a framework to reason about the correctness of the generated derivative code, from which we justify our OpenMP extension to the differentiation model. We implement this model in the automatic differentiation tool Tapenade and present test cases that are differentiated following our extended differentiation procedure. Performance of the generated derivative programs in forward and reverse mode is better than sequential, although our reverse mode often scales worse than the input programs.

97 MATHEMATICS AND COMPUTING↗

Portable Software Environment for Ultrahigh-Resolution ELM Development on GPUs

This paper presents our endeavors in developing the large-scale, ultra-high-resolution E3SM Land Model (uELM), specifically designed for exascale computers furnished with accelerators such as Nvidia GPUs. The uELM is a sophisticated code that substantially relies on High-Performance Computing (HPC) environments, necessitating particular machine and software configurations. To facilitate community-based uELM developments employing GPUs, we have created a portable, standalone software environment preconfigured with uELM input datasets, simulation cases, and source code. This environment, utilizing Docker, encompasses all essential code, libraries, and system software for uELM development on GPUs. It also features a functional unit test framework and an offline model testbed for comprehensive numerical experiments. From a technical perspective, the paper discusses GPU-ready container generations, uELM code management, and input data distribution across computational platforms. Lastly, the paper demonstrates the use of environment for functional unit testing, end-to-end simulation on CPUs and GPUs, and collaborative code development.

E3SM Land Model↗

Computing the Properties of Matter with Leadership Computing Resources (Closeout Report for DE-SC0018121)

In order to add more capabilities to Halide, we have designed a new framework called Tiramisu and integrated this framework into Halide. Since Tiramisu enables Halide to target heterogeneous architectures, our development efforts have been refocused on Tiramisu. Most high-performance computer systems today are complex and increasingly heterogeneous; they may have CPUs, GPUs and FPGAs. Achieving best performance requires taking full advantage of all these different architectures. To address this issue, we have designed Tiramisu, an optimization framework that enables Halide (and other DSLs) to target heterogeneous architectures. Tiramisu is an optimization framework that takes as input a high level, architecture-independent representation of code and a set of scheduling and data mapping commands that guide code transformation. The input can either be generated by a domain-specific language (DSL) compiler such as Halide or directly written by a programmer. Tiramisu then applies the user-specified code and data-layout transformations and generates an architecture-specific, low-level intermediate representation (IR) that takes advantage of modern architectural features such as multicore parallelism, non-uniform memory (NUMA) hierarchies, clusters, and accelerators like GPUs and FPGAs. We integrated Tiramisu within Halide and implemented a representative set of benchmarks to evaluate this integration. Tiramisu is now open source and is available for public use (http://tiramisu-compiler.org/). A paper about Tiramisu was published, it shows that Tiramisu extends Halide with many new capabilities and that Tiramisu can generate efficient code for multicores, GPUs, FPGAs and distributed heterogeneous systems. The performance of code generated by the Tiramisu backends matches or exceeds hand optimized reference implementations. For example, the multicore backend matches the highly optimized Intel MKL library on many kernels and shows speedups reaching 4x over the original Halide. In addition to making Tiramisu more robust, we have used Tiramisu to implement a set of representative tensor operation for constructing baryon building blocks required for multi baryon contractions in LQCD. In order to implement this code, we needed to generalize Tiramisu in two ways: first we needed to support indirect array accesses, and second, we needed to add support for complex numbers to Tiramisu. The code generated by Tiramisu is 6x faster than the reference code. Our efforts towards an MPI based multi-node version of tiramisu have matured and the resulting code scales well on multiple nodes (tests up to 512 KNL nodes have been undertaken).

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Microstructure homogenization of concrete used in nuclear power plants

Almost all nuclear power plants in the United States are operating past their intended lifetimes or are requesting lifetime extensions. Therefore, understanding changes to the concrete containment structure over time is crucial to evaluate the structure’s continued viability. Concrete materials are heterogeneous particulate composites that exhibit viscoelastic material properties, which can lead to slow deformation over time, causing stress redistribution and the potential for creep cracking. A code to generate random, three dimensional (3D) concrete microstructures has been developed and paired with finite element analysis to predict the long-term viscoelastic properties of concrete. Data from these simulations are used to develop constitutive equations for the viscoelastic behavior of the homogenized concrete. The codes in this work are used to virtualize laboratory experiments, to obtain long-term creep data in a faster, cheaper manner. To validate this work, the simulated creep behavior of concrete is compared to 800 d of experimental data that has been extended to 27 y of data using the Time-Temperature superposition (TTS) principal. Excellent agreement between the simulation results and experimental data is seen.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

GPU Lifetimes on Titan Supercomputer: Survival Analysis and Reliability

George Ostrouchov, Don Maxwell, Rizwan Ashraf, Mallikarjun Shankar, and James Rogers. 2020. GPU Lifetimes on Titan Supercomputer: Survival Analysis and Reliability. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC '20). Association for Computing Machinery, New York, NY, USA. Data and code for SC20 paper about Titan GPU reliability analysis: https://github.com/olcf/TitanGPULife. Includes R code to generate graphics for paper and additional analyses. See code/README for instructions. Includes original Titan GPU reliability data on over 100,000 collective hours of operation: data/titan.gpu.history.txt - history data, data/titan.service.txt - service nodes for exclusion. Includes output data files produced by code/TitanGPUmodel.Rmd: data/gc_full.csv - cleaned up data (see paper and R code); data/gc_summary_loc.csv - one record per GPU (variables: SN, time, nlife, nloc, last, col, row, cage, slot, node, max_loc_events, time_max_loc, dbe, dbe_loc, otb, otb_loc, out, batch, days, years, dead, dead_otb, dead_dbe) (see paper and R code). Includes .Rmd analysis document as TitanGPUmode.html. Includes Python code to process data/gc_full.csv into graphics from time-between-failure analyses: See code/tbf-analyses/README for instructions.

42 ENGINEERING↗

Renovating Monte Carlo Methods and Codebases with Generative Models

The code will implement a standardized interface for Monte Carlo sampling methods, including conventional techniques, and going beyond current available packages to also incorporate generative model-enabled Monte Carlo sampling to provide a unified framewor

Garcia-Cardona, Cristina↗