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 325 records · Page 18

FREYA-a new Monte Carlo code for improved modeling of fission chains

A new simulation capability for modeling of individual fission events and chains and the transport of fission products in materials is presented. FREYA ( Fission Yield Event Yield Algorithm ) is a Monte Carlo code for generating fission events providing correlated kinematic information for prompt neutrons, gammas, and fragments. As a standalone code, FREYA calculates quantities such as multiplicity-energy, angular, and gamma-neutron energy sharing correlations. To study materials with multiplication, shielding effects, and detectors, we have integrated FREYA into the general purpose Monte Carlo code MCNP. This new tool will allow more accurate modeling of detector responses including correlations and the development of SNM detectors with increased sensitivity.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Discretization error estimation and exact solution generation using the method of nearby problems.

The Method of Nearby Problems (MNP), a form of defect correction, is examined as a method for generating exact solutions to partial differential equations and as a discretization error estimator. For generating exact solutions, four-dimensional spline fitting procedures were developed and implemented into a MATLAB code for generating spline fits on structured domains with arbitrary levels of continuity between spline zones. For discretization error estimation, MNP/defect correction only requires a single additional numerical solution on the same grid (as compared to Richardson extrapolation which requires additional numerical solutions on systematically-refined grids). When used for error estimation, it was found that continuity between spline zones was not required. A number of cases were examined including 1D and 2D Burgers equation, the 2D compressible Euler equations, and the 2D incompressible Navier-Stokes equations. The discretization error estimation results compared favorably to Richardson extrapolation and had the advantage of only requiring a single grid to be generated.

99 GENERAL AND MISCELLANEOUS↗

Insertion of operation-and-indicate instructions for optimized SIMD code

Mechanisms are provided for inserting indicated instructions for tracking and indicating exceptions in the execution of vectorized code. A portion of first code is received for compilation. The portion of first code is analyzed to identify non-speculative instructions performing designated non-speculative operations in the first code that are candidates for replacement by replacement operation-and-indicate instructions that perform the designated non-speculative operations and further perform an indication operation for indicating any exception conditions corresponding to special exception values present in vector register inputs to the replacement operation-and-indicate instructions. The replacement is performed and second code is generated based on the replacement of the at least one non-speculative instruction. The data processing system executing the compiled code is configured to store special exception values in vector output registers, in response to a speculative instruction generating an exception condition, without initiating exception handling.

97 MATHEMATICS AND COMPUTING↗

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↗

Comparisons between a priori Uncertainty Quantification and Calculation/Measurement Discrepancies Applied to the MERCI UO{sub 2} Fuel Rod Decay Heat Experiment

In 2008, an UO{sub 2} fuel rod was irradiated up to ∼ 3.5 GWd/tHL in the CEA/Saclay research reactor Osiris through the MERCI experiment. Some rod's pellets were analysed. Experimental results were obtained: - fuel rod decay heat measurement by calorimetry (cooling times from 27 minutes to 42 days), - evaluation of the amounts of some nuclei (U, Pu, Cs, Nd...) by isotopic dilution mass spectrometry, - nuclide activities. Comparison of type (C - M)/M where C is the calculated decay heat and M the experimentally measured decay heat was reported in reference. Neutronics flux was computed by CEA TRIPOLI-4 Monte-Carlo or APOLLO2 deterministic transport code system. Irradiation and cooling phases were simulated with CEA DARWIN/PEPIN2 code system. Good agreements were globally shown between numerical simulation results and experimental measurements on total decay heat. Uncertainty propagation in this previous work was established from Rebah's studies. These last years, within the framework of supports to its industrial partners EDF and Areva, the CEA/DEN has implemented two different approaches to propagate nuclear data uncertainties to depletion code outputs. A direct forward deterministic perturbation method using sensitivity profiles was implemented in the French industrial depletion code system DARWIN/PEPIN2. Meanwhile, a propagation based on Monte Carlo correlated sampling was achieved using the CEA uncertainty platform URANIE and the new generation depletion code MENDEL. Both methods will be described in this article. Uncertainties on nuclear data (independent fission yields, multigroup microscopic cross sections, radioactive decay constants, radioactive decay branching ratio and radioactive decay energies) are propagated to decay heat and isotopic concentrations. To match MERCI first study, flux computation is realized by APOLLO2. Furthermore, uncertainty quantification (UQ) is re-evaluated by both DARWIN/PEPIN2 and MENDEL codes. It is an important stage in the process of validating both depletion codes with their respective data library. (authors)

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

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↗

Analysis of supercritical CO{sub 2} cycle control strategies and dynamic response for Generation IV Reactors.

The analysis of specific control strategies and dynamic behavior of the supercritical carbon dioxide (S-CO{sub 2}) Brayton cycle has been extended to the two reactor types selected for continued development under the Generation IV Nuclear Energy Systems Initiative; namely, the Very High Temperature Reactor (VHTR) and the Sodium-Cooled Fast Reactor (SFR). Direct application of the standard S-CO{sub 2} recompression cycle to the VHTR was found to be challenging because of the mismatch in the temperature drop of the He gaseous reactor coolant through the He-to-CO{sub 2} reactor heat exchanger (RHX) versus the temperature rise of the CO{sub 2} through the RHX. The reference VHTR features a large temperature drop of 450 C between the assumed core outlet and inlet temperatures of 850 and 400 C, respectively. This large temperature difference is an essential feature of the VHTR enabling a lower He flow rate reducing the required core velocities and pressure drop. In contrast, the standard recompression S-CO{sub 2} cycle wants to operate with a temperature rise through the RHX of about 150 C reflecting the temperature drop as the CO{sub 2} expands from 20 MPa to 7.4 MPa in the turbine and the fact that the cycle is highly recuperated such that the CO{sub 2} entering the RHX is effectively preheated. Because of this mismatch, direct application of the standard recompression cycle results in a relatively poor cycle efficiency of 44.9%. However, two approaches have been identified by which the S-CO{sub 2} cycle can be successfully adapted to the VHTR and the benefits of the S-CO{sub 2} cycle, especially a significant gain in cycle efficiency, can be realized. The first approach involves the use of three separate cascaded S-CO{sub 2} cycles. Each S-CO{sub 2} cycle is coupled to the VHTR through its own He-to-CO{sub 2} RHX in which the He temperature is reduced by 150 C. The three respective cycles have efficiencies of 54, 50, and 44%, respectively, resulting in a net cycle efficiency of 49.3 %. The other approach involves reducing the minimum cycle pressure significantly below the critical pressure such that the temperature drop in the turbine is increased while the minimum cycle temperature is maintained above the critical temperature to prevent the formation of a liquid phase. The latter approach also involves the addition of a precooler and a third compressor before the main compressor to retain the benefits of compression near the critical point with the main compressor. For a minimum cycle pressure of 1 MPa, a cycle efficiency of 49.5% is achieved. Either approach opens up the door to applying the SCO{sub 2} cycle to the VHTR. In contrast, the SFR system typically has a core outlet-inlet temperature difference of about 150 C such that the standard recompression cycle is ideally suited for direct application to the SFR. The ANL Plant Dynamics Code has been modified for application to the VHTR and SFR when the reactor side dynamic behavior is calculated with another system level computer code such as SAS4A/SYSSYS-1 in the SFR case. The key modification involves modeling heat exchange in the RHX, accepting time dependent tabular input from the reactor code, and generating time dependent tabular input to the reactor code such that both the reactor and S-CO{sub 2} cycle sides can be calculated in a convergent iterative scheme. This approach retains the modeling benefits provided by the detailed reactor system level code and can be applied to any reactor system type incorporating a S-CO{sub 2} cycle. This approach was applied to the particular calculation of a scram scenario for a SFR in which the main and intermediate sodium pumps are not tripped and the generator is not disconnected from the electrical grid in order to enhance heat removal from the reactor system thereby enhancing the cooldown rate of the Na-to-CO{sub 2} RHX. The reactor side is calculated with SAS4A/SASSYS-1 while the S-CO{sub 2} cycle is calculated with the Plant Dynamics Code with a number of iterations over a timescale of 500 seconds. It is found that the RHX undergoes a maximum cooldown rate of {approx} -0.3 C/s. The Plant Dynamics Code was also modified to decrease its running time by replacing the compressible flow form of the momentum equation with an incompressible flow equation for use inside of the cooler or recuperators where the CO{sub 2} has a compressibility similar to that of a liquid. Appendices provide a quasi-static control strategy for a SFR as well as the self-adaptive linear function fitting algorithm developed to produce the tabular data for input to the reactor code and Plant Dynamics Code from the detailed output of the other code.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

Special issue: Advanced stencil-code engineering

Here, stencil codes are compute-intensive algorithms, in which data points arranged in a large grid are being recomputed repeatedly from the values of data points in a predefined neighborhood. This fixed neighborhood pattern is called a stencil. Stencils codes see wide-spread use in computing the discrete solutions of partial differential equations and systems composed of such equations.

97 MATHEMATICS AND COMPUTING↗

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↗

Methodology for fast detection of false sharing in threaded scientific codes

A profiling tool identifies a code region with a false sharing potential. A static analysis tool classifies variables and arrays in the identified code region. A mapping detection library correlates memory access instructions in the identified code region with variables and arrays in the identified code region while a processor is running the identified code region. The mapping detection library identifies one or more instructions at risk, in the identified code region, which are subject to an analysis by a false sharing detection library. A false sharing detection library performs a run-time analysis of the one or more instructions at risk while the processor is re-running the identified code region. The false sharing detection library determines, based on the performed run-time analysis, whether two different portions of the cache memory line are accessed by the generated binary code.

97 MATHEMATICS AND COMPUTING↗

Multiscale Analysis of Pebble Bed Reactors

– The PEBBED code was developed at the Idaho National Laboratory for design and analysis of pebble-bed high temperature reactors. The diffusion-depletion-pebble-mixing algorithm of the original PEBBED code was enhanced through coupling with the THERMIX-KONVEK code for thermal fluid analysis and by the COMBINE code for online cross section generation. The COMBINE code solves the B-1 or B-3 approximations to the transport equation for neutron slowing down and resonance interactions in a homogeneous medium with simple corrections for shadowing and thermal self-shielding. The number densities of materials within specified regions of the core are averaged and transferred to COMBINE from PEBBED for updating during the burnup iteration. The simple treatment of self-shielding in previous versions of COMBINE led to inaccurate results for cross sections and unsatisfactory core performance calculations. A new version of COMBINE has been developed that treats all levels of heterogeneity using the 1D transport code ANISN. In a 3-stage calculation, slowing down is performed in 167 groups for each homogeneous subregion (kernel, particle layers, graphite shell, control rod absorber annulus, etc.) Particles in a local average pebble are homogenized using ANISN then passed to the next (pebble) stage. A 1D transport solution is again performed over the pebble geometry and the homogenized pebble cross sections are passed to a 1-d radial model of a wedge of the pebble bed core. This wedge may also include homogeneous reflector regions and a control rod region composed of annuli of different absorbing regions. Radial leakage effects are therefore captured with discrete ordinates transport while axial and azimuthal effects are captured with a transverse buckling term. In this paper, results of various PBR models will be compared with comparable models from literature. Performance of the code will be assessed.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

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↗