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 91 records · Page 5

Center for Technology for Advanced Scientific Component Software

The UO portion of the larger TASCS project was focused on the usability subproject identified in the original project proposal. The key usability issue that we tacked was that of supporting legacy code developers in migrating to a component-oriented design pattern and development model with minimal manual labor. It was observed during the lifetime of the TASCS (and previous CCA efforts) that more often than not, users would arrive with existing code that was developed previous to their exposure to component design methods. As such, they were faced with the task of both learning the CCA toolchain and at the same time, manually deconstructing and reassembling their existing code to fit the design constraints imposed by components. This was a common complaint (and occasional reason for a user to abandon components altogether), so our task was to remove this manual labor as much as possible to lessen the burden placed on the end-user when adopting components for existing codes. To accomplish this, we created a source-based static analysis tool that used code annotations to drive code generation and transformation operations. The use of code annotations is due to one of the key technical challenges facing this work programming languages are limited in the degree to which application-specific semantics can be represented in code. For example, data types are often ambiguous. The C pointer is the most common example cited in practice. Given a pointer to a location in memory, should it be interpreted as a singleton or an array. If it is to be interpreted as an array, how many dimensions does the array have? What are their extents? The annotation language that we designed and implemented addresses this ambiguity issue by allowing users to decorate their code in places where ambiguity exists in order to guide tools to interpret what the programmer really intends.

97 MATHEMATICS AND COMPUTING↗

LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languages

The rapid evolution of large language models (LLMs) has opened new possibilities for automating various tasks in software development. This paper evaluates the capabilities of the LLaMA 2-70B model in automating these tasks for scientific applications written in commonly used programming languages. Using representative test problems, we assess the model's capacity to generate code, documentation, and unit tests, as well as its ability to translate existing code between commonly used programming languages. Our comprehensive analysis evaluates the compilation, runtime behavior, and correctness of the generated and translated code. Additionally, we assess the quality of automatically generated code, documentation, and unit tests. Here, our results indicate that while LLaMA 2-70B frequently generates syntactically correct and functional code for simpler numerical tasks, it encounters substantial difficulties with more complex, parallelized, or distributed computations, requiring considerable manual corrections. We identify key limitations and suggest areas for future improvements to better leverage AI-driven automation in scientific computing workflows.

97 MATHEMATICS AND COMPUTING↗

TUNE: Compiler-Directed Automatic Performance Tuning

This project has developed compiler-directed performance tuning technology targeting the Cray XT4 Jaguar system at Oak Ridge, which has multi-core Opteron nodes with SSE-3 SIMD extensions, and the Cray XE6 Hopper system at NERSC. To achieve this goal, we combined compiler technology for model-guided empirical optimization for memory hierarchies with SIMD code generation, which have been developed by the PIs over the past several years. We examined DOE Office of Science applications to identify performance bottlenecks and apply our system to computational kernels that operate on dense arrays. Our goal for this performance-tuning technology has been to yield hand-tuned levels of performance on DOE Office of Science computational kernels, while allowing application programmers to specify their computations at a high level without requiring manual optimization. Overall, we aim to make our technology for SIMD code generation and memory hierarchy optimization a crucial component of high-productivity Petaflops computing through a close collaboration with the scientists in national laboratories.

97 MATHEMATICS AND COMPUTING↗

High-yield recombinant bacterial expression of 13 C-, 15 N-labeled, serine-16 phosphorylated, murine amelogenin using a modified third generation genetic code expansion protocol

Amelogenin constitutes ~ 90% of the enamel matrix in the secretory stage of amelogenesis, a still poorly understood process that results in the formation of the hardest and most mineralized tissue in vertebrates – enamel. Most biophysical research with amelogenin uses recombinant protein expressed in Escherichia coli. In addition to providing copious amounts of protein, recombinant expression allows 13 C- and 15 N-labelling for detailed structural studies using NMR spectroscopy. However, native amelogenin is phosphorylated at one position, Ser-16 in murine amelogenin, and a lingering question overshadowing decades of enamel research with recombinant amelogenin is the effect of phosphorylation on its biophysical properties. Using a modified genetic code expansion protocol we have expressed and purified uniformly 13 C-, 15 N-labeled murine amelogenin (pS16M179) with ~95% of the protein being correctly phosphorylated. Homogeneous phosphorylation was achieved using commercially available, enriched, 13 C-, 15 N-labeled media and protein expression was induced with isopropyl β-D-1-thiogalactopyranoside at 310 K. Phosphoserine incorporation was verified from one-dimensional 31P NMR spectra, comparison of 1 H- 15 N HSQC spectra, Phos-tag SDS PAGE, and mass spectrometry. Phosphorus-31 NMR spectra for pS16M179 under conditions known to trigger amelogenin self-assembly into nanospheres confirm nanosphere models with buried N-termini. Lambda phosphatase treatment of these nanospheres results in the dephosphorylation of pS16M179, confirming that smaller oligomers and monomers with exposed N-termini are in equilibrium with nanospheres. Such 13 C-, 15 N-labeling of amelogenin with accurately encoded phosphoserine incorporation will accelerate biomineralization research to understand amelogenesis and stimulate the expanded use of genetic code expansion protocols to introduce phosphorylated amino acids into proteins.

31P-NMR↗

NSE abundance data

A novel method of calculating nuclear statistical equilibrium (NSE) is presented. Basic equations are carefully solved using arbitrary precision arithmetic. A special interpolation procedure is then used to retrieve all abundances using tabulated results for neutrons and protons, together with basic nuclear data. Proton and neutron abundance tables, basic nuclear data, and partition functions for nuclides used in the calculations are provided. A simple interpolation algorithm using pre-calculated p and n abundances tabulated as functions of kT, {rho} and Y{sub e} is outlined. Unique properties of this method are: (1) ability to pick up out of NSE selected nuclei only, (2) computational time scaling linearly with number of re-calculated abundances, (3) relatively small amount of stored data: only two large tables, (4) slightly faster than solving the NSE equations using traditional Newton-Raphson methods for small networks (few tens of species); superior for huge (800-3000) networks, (5) does not require initial guess; works well on random input, (6) can be tailored to specific application, (7) ability to use third-party NSE solvers to obtain fully compatible tables, and (8) encapsulation of the NSE code for bug-free calculations. A range of applications for this approach is possible: covering tests of traditional NSE Newton-Raphson codes, generating starting values, code-to-code verification, and possible replacement of the old legacy procedures in supernova simulations.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Implementation of McMurchie–Davidson Algorithm for Gaussian AO Integrals Suited for SIMD Processors

We report an implementation of the McMurchie− Davidson evaluation scheme for 1- and 2-particle Gaussian AO integrals designed for processors with Single Instruction Multiple Data (SIMD) instruction sets. Like in our recent MD implementation for graphical processing units (GPUs) [Asadchev, A.; Valeev, E. F.. J. Chem. Phys. 2024, 160, 244109.], variable-sized batches of shellsets of integrals are evaluated at a time. By optimizing for the floating point instruction throughput rather than minimizing the number of operations, this approach achieves up to 50% of the theoretical hardware peak FP64 performance for many common SIMD-equipped platforms (AVX2, AVX512, NEON), which translates to speedups of up to 30 over the state-of-the-art one-shellset-at-a-time implementation of Obara−Saika-type schemes in Libint for a variety of primitive and contracted integrals. As with our previous work, we rely on the standard C++ programming language such as the std::simd standard library feature to be included in the 2026 ISO C++ standard without any explicit code generation to keep the code base small and portable. The implementation is part of the open source LibintX library freely available at https://github.com/ValeevGroup/libintx.

Basis sets↗

Tau-REx I: A next generation retrieval code for exoplanetary atmospheres

Spectroscopy of exoplanetary atmospheres has become a well established method for the characterization of extrasolar planets. We here present a novel inverse retrieval code for exoplanetary atmospheres. T-REx(Tau Retrieval for Exoplanets) is a line-by-line radiative transfer fully Bayesian retrieval framework. T-REx includes the following features:(1) the optimized use of molecular line lists from the ExoMol project; (2) an unbiased atmospheric composition prior selection, through custom built pattern recognition software; (3) the use of two independent algorithms to fully sample the Bayesian likelihood space: nested sampling as well as a more classical Markov Chain Monte Carlo approach; (4) iterative Bayesian parameter and model selection using the full Bayesian Evidence as well as the Savage–Dickey Ratio for nested models; and (5) the ability to fully map very large parameter spaces through optimal code parallelization and scalability to cluster computing. In this publication we outline the T-REx framework and demonstrate, using a theoretical hot-Jupiter transmission spectrum, the parameter retrieval and model selection. We investigate the impact of signal-to-noise ratio and spectral resolution on the retrievability of individual model parameters, both in terms of error bars on the temperature and molecular mixing ratios as well as its effect on the model’s global Bayesian evidence.

79 ASTRONOMY AND ASTROPHYSICS↗

Final Report from The University of Texas at Austin for DEGAS: Dynamic Global Address Space programming environments

The Dynamic, Exascale Global Address Space programming environment (DEGAS) project will develop the next generation of programming models and runtime systems to meet the challenges of Exascale computing. Our approach is to provide an efficient and scalable programming model that can be adapted to application needs through the use of dynamic runtime features and domain-specific languages for computational kernels. We address the following technical challenges: Programmability: Rich set of programming constructs based on a Hierarchical Partitioned Global Address Space (HPGAS) model, demonstrated in UPC++. Scalability: Hierarchical locality control, lightweight communication (extended GASNet), and ef- ficient synchronization mechanisms (Phasers). Performance Portability: Just-in-time specialization (SEJITS) for generating hardware-specific code and scheduling libraries for domain-specific adaptive runtimes (Habanero). Energy Efficiency: Communication-optimal code generation to optimize energy efficiency by re- ducing data movement. Resilience: Containment Domains for flexible, domain-specific resilience, using state capture mechanisms and lightweight, asynchronous recovery mechanisms. Interoperability: Runtime and language interoperability with MPI and OpenMP to encourage broad adoption.

97 MATHEMATICS AND COMPUTING↗

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↗

Advanced Power Electronic Interfaces for Distributed Energy Systems, Part 2: Modeling, Development, and Experimental Evaluation of Advanced Control Functions for Single-Phase Utility-Connected Inverter

Integrating renewable energy and distributed generations into the Smart Grid architecture requires power electronic (PE) for energy conversion. The key to reaching successful Smart Grid implementation is to develop interoperable, intelligent, and advanced PE technology that improves and accelerates the use of distributed energy resource systems. This report describes the simulation, design, and testing of a single-phase DC-to-AC inverter developed to operate in both islanded and utility-connected mode. It provides results on both the simulations and the experiments conducted, demonstrating the ability of the inverter to provide advanced control functions such as power flow and VAR/voltage regulation. This report also analyzes two different techniques used for digital signal processor (DSP) code generation. Initially, the DSP code was written in C programming language using Texas Instrument's Code Composer Studio. In a later stage of the research, the Simulink DSP toolbox was used to self-generate code for the DSP. The successful tests using Simulink self-generated DSP codes show promise for fast prototyping of PE controls.

24 POWER TRANSMISSION AND DISTRIBUTION↗

Recent Updates in ETOE-2 and MC 2 -3

The MC 2 -3 code is a multigroup cross section generation code for fast reactor applications, developed by Argonne National Laboratory (ANL) under the DOE Nuclear Energy Advanced Modeling and Simulation (NEAMS) program. In this work, first, the cross section libraries for ENDF/B-VII.1 and ENDF/B-VIII.0 data were generated using the updated ETOE-2 code. Preliminary verification and validation tests of the ENDF/B-VII.1 MC 2 -3 library were performed with the selected fast reactor benchmark problems. Processing and verifying the libraries suggested that significant efforts would be required for thoroughly verifying the ENDF/B-VII.1 MC 2 -3 library and successfully processing the ENDF/B-VIII.0 MC 2 -3 library. Secondly, the cross section generation capability of MC 2 -3 was updated with the intermediate group lattice calculation and the equivalent Dancoff-factor cell (EDC) method to significantly improve the performance of a twodimensional assembly calculation using the method of characteristics (MOC). This effort was made useful in implementing and verifying the EDC method in the Griffin cross section API. Finally, we analyzed a SFR problem, for which unusually large deviations in core eigenvalues from Monte Carlo solutions were reported, by generating multigroup cross sections with MC 2 -3, performing core calculations with DIF3D-VARIANT, and analyzing cross section and eigenvalue results against Monte Carlo solutions. The analysis confirmed that the MC 2 -3/DIF3D solutions were in good agreement with Monte Carlo solutions, providing the correct process of accurately generating broad-group cross sections with MC 2 -3

97 MATHEMATICS AND COMPUTING↗

Performance-Aligned LLMs for Generating Fast HPC Code

Optimizing scientific software is a difficult task because codebases are often large and complex, and performance can depend upon several factors including the algorithm, its implementation, and hardware among others. Causes of poor performance can originate from disparate sources and be difficult to diagnose. Recent years have seen a multitude of work that use large language models (LLMs) to assist in software development tasks. However, these tools are trained to model the distribution of code as text, and are not specifically designed to understand performance aspects of code. In this work, we introduce a reinforcement learning based methodology to align the outputs of code LLMs with performance. This allows us to build upon the current code modeling capabilities of LLMs and extend them to generate better performing code. Here, we demonstrate that our fine-tuned model improves the expected speedup of generated code over base models for a set of benchmark tasks from 0.9 to 1.6 for serial code and 1.9 to 4.5 for OpenMP parallel code.

Computer science↗

Architectural and Algorithmic Requirements for a Next-Generation System Analysis Code

This document presents high-level architectural and system requirements for a next-generation system analysis code (NGSAC) to support reactor safety decision-making by plant operators and others, especially in the context of light water reactor plant life extension. The capabilities of NGSAC will be different from those of current-generation codes, not only because computers have evolved significantly in the generations since the current paradigm was first implemented, but because the decision-making processes that need the support of next-generation codes are very different from the decision-making processes that drove the licensing and design of the current fleet of commercial nuclear power reactors. The implications of these newer decision-making processes for NGSAC requirements are discussed, and resulting top-level goals for the NGSAC are formulated. From these goals, the general architectural and system requirements for the NGSAC are derived.

97 MATHEMATICS AND COMPUTING↗

Class Interface XML (CIX)

CIX is a Java-based code generator that bridges C++ and Fortran by automatically generating C and Fortran wrapper code from XML descriptions of C++ classes. It allows Fortran programs to interact naturally with complex C++ libraries without manual writing of language bindings.

Lefebvre, RobertA [Oak Ridge National Laboratory (↗

Clutter mitigation, multiple peaks, and high-order spectral moments in 35 GHz vertically pointing radar velocity spectra

Abstract. This study presents and applies three separate processing methods to improve high-order moments estimated from 35 GHz (Ka band) vertically pointing radar Doppler velocity spectra. The first processing method removes Doppler-shifted ground clutter from spectra collected by a US Department of Energy (DOE) Atmospheric Radiation Measurement (ARM) program Ka-band zenith pointing radar (KAZR) deployed at Oliktok Point (OLI), Alaska. Ground clutter resulted from multiple pathways through antenna side lobes and reflections off a rotating scanning radar antenna located 2 m away from KAZR, which caused Doppler shifts in ground clutter returns from stationary targets 2.5 km away. After removing clutter in the recorded velocity spectra, the second processing method identifies multiple separate and sub-peaks in the spectra and estimates high-order moments for each peak. Multiple peaks and high-order moments were estimated for both original 2 and 15 s averaged spectra. The third processing step improves the spectrum variance, skewness, and kurtosis estimates by removing velocity variability due to turbulent broadening during 15 s averaging intervals. Applying the multiple peak processing to Doppler velocity spectra during liquid-only clouds can identify cloud and drizzle particles and during mixed-phase clouds can identify liquid cloud and frozen hydrometeors. Consistent with previous studies, this work found that spectrum skewness assuming only a single spectral peak was a good indicator of two hydrometeor populations (for example, cloud and drizzle particles) being present in the radar pulse volume. Yet, after dividing the spectrum into multiple peaks, velocity spectrum skewness for individual peaks is near zero, indicating nearly symmetric peaks. This suggests that future studies should use velocity skewness of single-peak spectra as an indicator of possible multiple hydrometeor populations and then use multiple-peak moments for quantitative studies. Three future activities will continue this work. First, KAZR spectra from several ARM sites have been processed and are available in the ARM archive as a principal investigator (PI) product. ARM programmers are evaluating these processing methods as part of future multiple-peak products generated by ARM. Third, MATLAB code generating the Oliktok Point products has been uploaded as supplemental material for public dissemination.

47 OTHER INSTRUMENTATION↗

Covariance Generation Using CONRAD and SAMMY Computer Codes

Covariance generation in the resolved resonance region can be generated using the computer codes CONRAD and SAMMY. These codes use formalisms derived from the R-matrix methodology together with the generalized least squares technique to obtain resonance parameter. In addition, resonance parameter covariance is also obtained. Results of covariance calculations for a simple case of the s-wave resonance parameters of 48Ti in the energy region 10-5 eV to 300 keV are compared. The retroactive approach included in CONRAD and SAMMY was used.

99 GENERAL AND MISCELLANEOUS↗

Decay Heat Quantification in the High Temperature Test Reactor

The proper calculation of decay heat is necessary for both postulated accidents as well as normal spent fuel repository safety analysis. Since the 1970s, the nuclear industry has primarily relied on the use of the ANSI/ANS-5.1 standard or one of it’s predecessors as the tool for calculating such heat. However, different reactor systems can have substantially different materials, neutron spectrums, operating characteristics, etc.…that lead to vastly different isotopic compositions in the fuel over time. The ANSI/ANS-5.1 standard is specific to Light Water Reactors, and thus may not be well suited for other systems such as high temperature gas reactors. Recent developments in the SCALE 6 code developed at Oak Ridge National Laboratory have allowed for a more accurate treatment of the complexity associated with high temperature reactor TRISO fuel. Also, the standalone isotopic depletion and generation code ORIGEN-S, a module of SCALE, has been validated against experimental data for LWRs for properly characterizing decay heat. And most recently, Japan Atomic Energy Agency has used the ORIGEN code to generate HTGR cross section libraries to be used to quantify the decay heat generated in the High Temperature Engineering Test Reactor at the Oarai Research and Development Center. Given the Idaho National Laboratory’s continued research into the viability of HTGRs as a next generation power reactor, an independent decay heat quantification analysis has been performed for a variety of fuel enrichments, TRISO particle packing fractions, and fuel temperatures using a similar approach. Furthermore, these data are then used as input into the RAVEN code developed at INL. A Reduced Order Model mathematical model in RAVEN is ‘trained’ to create a response mechanism to the various input parameters. Preliminary results demonstrate the potential for using this methodology to accurately predict decay heat generation.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

PyOMP: Multithreaded Parallel Programming in Python

We know that Python is a widely used language in scientific computing. When the goal is high performance, however, Python lags far behind low-level languages such as C and Fortran. To support applications that stress performance, Python needs to access the full capabilities of modern CPUs. That means support for parallel multithreading. In this paper, we describe PyOMP, a system that enables OpenMP in Python. Programmers write code in Python with OpenMP, Numba generates code that compiles to LLVM, and the resulting programs run with performance that approaches that from code written with C and OpenMP. In this paper we provide an update on the PyOMP project and explain how to install it and use it to write parallel multithreaded code in Python.

97 MATHEMATICS AND COMPUTING↗