Search NASA⌕ Search

SEARCH · Search NASA

Results for “Source Code Analysis”

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 73 records · Page 4

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↗

Structure‐Aware Representation Learning for Effective Performance Prediction

ABSTRACT Application performance is a function of several unknowns stemming from the interactions between the application, runtime, OS, and underlying hardware, making it challenging to model performance using deep learning techniques, especially without a large labeled dataset. Collecting such labeled longitudinal datasets can take weeks. Intuitively, developers could save analysis time during code development by taking a comparative approach between multiple applications. However, the unknown dynamic interactions between applications and execution environments make it difficult for deep learning‐based models to predict the performance of new applications. In this paper, we address these problems by presenting a labeled dataset for the community and taking a comparative analysis approach to explore the source code differences between different correct implementations of the same problem. This paper assesses the feasibility of using purely static information, for example, Abstract Syntax Tree (AST), of applications to predict performance change based on code structure. We evaluate several deep learning‐based representation learning techniques for source code and propose an architecture for the tree‐based Long Short‐Term Memory (LSTM) models to discover latent representations for a source code's hierarchical structure. We demonstrate that our proposed architecture enables feed‐forward predictive models to predict change in performance using source code with up to 84% accuracy.

Ramadan, Tarek [Department of Computer Science Tex↗

Use of the portable decay gamma source feature in the R2Smesh code system for the accurate estimation of photon radiation dose fields around activated ITER components - Paper 111

The R2Smesh ('Rigorous 2-step') code system, developed by KIT for the determination of shut-down dose rate distribution on mesh grid, can be utilized to provide photon radiation dose field around activated components which are moved from the irradiation site in fusion reactor to another external location. R2Smesh couples MCNP transport calculations and FISPACT inventory calculations through suitable interfaces utilizing MCNP mesh tally capability. Neutron flux and the decay gamma source are provided with high resolution on the mesh grid superimposed to the real geometry to take into account the spatial variations of the flux and the decay gamma source distributions. This feature enables the decay gamma source distribution to be transferred from the irradiation site in the reactor to any other external location for the determination of photon flux and dose rate distributions. In this work, we applied the feature of the portable decay gamma source in R2Smesh code system to a dose rate analysis for a tunnel connecting the ITER tokamak complex building (TCB) and the hot cell facility building (HCFB). This paper presents the use of the portability feature of the decay gamma source in R2Smesh interface code system developed by KIT for a dose rate analysis of the ITER tunnel connecting TCB and HCFB. This application shows that the decay gamma source of the activated components could be transferred successfully from one coordinate system to another coordinate system and superimposed to the geometry of the components. This is very useful when the activated components need to be transported from the reactor to somewhere else for maintenance, testing or storage and the dose rate analysis is requested. Another portable feature, which could convert the 3D decay gamma source distribution generated by R2Smesh system to the MCNP 'SDEF' card source description and avoid the use of source sampling subroutine, is under consideration. With this feature, one decay gamma source result for the specific reactor components could be shared by different institutions who need to use the same decay gamma source for different analysis. (authors)

61 RADIATION PROTECTION AND DOSIMETRY↗

Symmetry-mode analysis for local structure investigations using pair distribution function data

Symmetry-adapted distortion modes provide a natural way of describing distorted structures derived from higher-symmetry parent phases. Structural refinements using symmetry-mode amplitudes as fit variables have been used for at least ten years in Rietveld refinements of the average crystal structure from diffraction data; more recently, this approach has also been used for investigations of the local structure using real-space pair distribution function (PDF) data. Here, the value of performing symmetry-mode fits to PDF data is further demonstrated through the successful application of this method to two topical materials: TiSe2, where a subtle but long-range structural distortion driven by the formation of a charge-density wave is detected, and MnTe, where a large but highly localized structural distortion is characterized in terms of symmetry-lowering displacements of the Te atoms. Here, the analysis is performed using fully open-source code within the DiffPy framework via two packages developed for this work: isopydistort, which provides a scriptable interface to the ISODISTORT web application for group theoretical calculations, and isopytools, which converts the ISODISTORT output into a DiffPy-compatible format for subsequent fitting and analysis. These developments expand the potential impact of symmetry-adapted PDF analysis by enabling high-throughput analysis and removing the need for any commercial software.

36 MATERIALS SCIENCE↗

Analysis of the beam halo in negative ion sources by using 3D3V PIC code

The physical mechanism of the formation of the negative ion beam halo and the heat loads of the multi-stage acceleration grids are investigated with the 3D PIC (particle in cell) simulation. The following physical mechanism of the beam halo formation is verified: The beam core and the halo consist of the negative ions extracted from the center and the periphery of the meniscus, respectively. This difference of negative ion extraction location results in a geometrical aberration. Furthermore, it is shown that the heat loads on the first acceleration grid and the second acceleration grid are quantitatively improved compared with those for the 2D PIC simulation result.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

Assurance of Reasoning Enabled Systems (ARES)

ARES was in part motivated by the determination of President’s Council of Advisors on Science and Technology (PCAST) on May 13th, 2023 that published a set of inquiries: In an era in which convincing images, audio, and text can be generated with ease on a massive scale, how can we ensure reliable access to verifiable, trustworthy information? How can we be certain that a particular piece of media is genuinely from the claimed source? What technologies, policies, and infrastructure can be developed to detect and counter AI-generated disinformation? In an effort to automatically analyze and patch/optimize code the work in this report describes various neural Machine Learning (ML) analysis engine implementations to assist in situations where source code is deficient or completely lacking to decompile (lift) binary code to ’C’. The goal is to gradually reduce human intervention. To this end, two Large Language Model (LLM) variants (Code LLama 2, LLama 3.1 and Starcoder1, Starcoder 2) where finetuned with ’before/after’ code pairs on the OpenBLAS library. LLama trained on the lowering process, Starcoder trained on the lifting process with National Security Agency’s (NSA) open-source Ghidra decompiler assist. The inferencing test results indicate correctness for only very short sequences for Starcoder 2. Moving forward, the experiments conclude with a set of recommendations of required resources and technologies

97 MATHEMATICS AND COMPUTING↗

GeoPhysical Analysis Code

GPAC is a code that integrates open source libraries for element formulations, linear algebra, and I/O with two main LLNL-Written components: (i) a set of standard finite elements physics solvers for rersolving Darcy fluid flow, explicit mechanics, implicit mechanics, and fluid-mediated fracturing, including resolution of contact both implicity and explicity, and (ii) a MPI-based parallelization implementation for use on generic HPC distributed memory architectures. The resultant code can be used alone for linearly elastic problems and problems involving hydraulic fracturing, where the mesh topology is dynamically changed. The key application domain is for low-rate stimulation and fracture control in subsurface reservoirs (e.g., enhanced geothermal sites and unconventional shale gas stimulation). GPAC also has interfaces to call external libraries for, e.g., material models and equations of state; however, LLNL-developed EOS and material models will not be part of the current release.

Source record↗

GeoPhysical Analysis Code

GPAC is a code that integrates open source libraries for element formulations, linear algebra, and I/O with two main LLNL-written components: (i) a set of standard finite, discrete, and discontinuous displacement element physics solvers for resolving Darcy fluid flow, explicit mechanics, implicit mechanics, fault rupture and earthquake nucleation, and fluid-mediated fracturing, including resolution of physcial behaviors both implicity and explicity, and (ii) a MPI-based parallelization implementation for use on generic HPC distributed memory architectures. The resultant code can be used alone for linearly elastic problems; ploblems involving hydraulic fracturing, where the mesh topology is dynamically changed; fault rupture modeling and seismic risk assessment; and general granular materials behavior. The key application domain is for low-rate stimulation and fracture control in subsurface reservoirs (e.g., enhanced geothermal sites and unconventional shale gas stimulation). GPAC also has interfaces to call external libraries for , e.g., material models and equations of state; however, LLNL-developed EOS and material models will not be part of the current release. CPAC's secondary applications include modeling fault evolution for predicting the statistical distribution of earthquake events and to capture granular materials behavior under different load paths.

Source record↗

An automatically curated first-principles database of ferroelectrics

Ferroelectric materials have technological applications in information storage and electronic devices. The ferroelectric polar phase can be controlled with external fields, chemical substitution and size-effects in bulk and ultrathin film form, providing a platform for future technologies and for exploratory research. In this work, we integrate spin-polarized density functional theory (DFT) calculations, crystal structure databases, symmetry tools, workflow software, and a custom analysis toolkit to build a library of known, previously-proposed, and newly-proposed ferroelectric materials. With our automated workflow, we screen over 67,000 candidate materials from the Materials Project database to generate a dataset of 255 ferroelectric candidates, and propose 126 new ferroelectric materials. We benchmark our results against experimental data and previous first-principles results. The data provided includes atomic structures, output files, and DFT values of band gaps, energies, and the spontaneous polarization for each ferroelectric candidate. Finally, we contribute our workflow and analysis code to the open-source python packages atomate and pymatgen so others can conduct analogous symmetry driven searches for ferroelectrics and related phenomena.

36 MATERIALS SCIENCE↗

MELCOR Accident Progression and Source Term Demonstration Calculations for a FHR

MELCOR is an integrated thermal hydraulics, accident progression, and source term code for reactor safety analysis that has been developed at Sandia National Laboratories for the United States Nuclear Regulatory Commission (NRC) since the early 1980s. Though MELCOR originated as a light water reactor (LWR) code, development and modernization efforts have expanded its application scope to include non-LWR reactor concepts. Current MELCOR development efforts include providing the NRC with the analytical capabilities to support regulatory readiness for licensing non-LWR technologies under Strategy 2 of the NRC's near- term Implementation Action Plans. Beginning with the Next Generation Nuclear Project (NGNP), MELCOR has undergone a range of enhancements to provide analytical capabilities for modeling the spectrum of advanced non-LWR concepts. This report describes the generic plant model developed to demonstrate MELCOR capabilities to perform fluoride-salt-cooled high-temperature reactor (FHR) safety evaluations. The generic plant model is based on publicly-available FHR design information. For plant aspects (e.g., reactor building leak rate and details of the cover-gas system) that are not described in the FHR references, the analysts made assumptions needed to construct a MELCOR full-plant model. The FHR model uses a TRi-structural ISOtropic (TRISO)-particle fuel pebble-bed reactor with a primary system rejecting heat to two coiled tube air heat ex changers. Three passive direct reactor auxiliary cooling systems provide heat removal to supplement or replace the emergency secondary system heat removal during accident conditions. Surrounding the reactor vessel is a low volume reactor cavity that insulates the reactor with fire bricks and thick concrete walls. A refractory reactor liner system provides water cooling to reduce the concrete wall temperatures. Example calculations are performed to show the plant response and MELCOR capabilities to characterize a range of accident conditions. The accidents selected for evaluation consider a range of degraded and failed modes of operation for key safety functions providing reactivity control, the primary system decay heat removal and also a piping leak of the line to the coolant drain tank.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

MELCOR Accident Progression and Source Term Demonstration Calculations for a Heat Pipe Reactor

MELCOR is an integrated thermal hydraulics, accident progression, and source term code for reactor safety analysis that has been developed at Sandia National Laboratories for the United States Nuclear Regulatory Commission (NRC) since the early 1980s. Though MELCOR originated as a light water reactor (LWR) code, development and modernization efforts have expanded its application scope to includ e non-LWR reactor concepts. Current MELCOR development efforts include providing the NRC with the analytical capabilities to support regulatory readiness for licensing non-LWR techno logies under Strategy 2 of the NRC?s near- term Implementation Action Plans. Beginning with the Next Generation Nuclear Project (NGNP), MELCOR has undergone a range of enha ncements to provide analytical capabilities for modeling the spectrum of advanced non-LWR concepts. This report describes the generic plant model developed to demonstrate MELCOR capabilities to perform heat pipe reactor (HPR) safety evaluations. The generic plant mode l is based on a publicly-available Los Alamos National Laboratory (LANL) Megapower design as modified in the Idaho National Laboratory (INL) Design A description. For plant aspects (e.g., reactor building size and leak rate) that are not described in the LANL and INL references , the analysts made assumptions needed to construct a MELCOR full-plant model. The HP R uses high assay, low-enrichment uranium (HALEU) fuel with steel cladding that uses heat pipes to transfer heat to a secondary Brayton air cycle. The core region is surrounded by a stainless-steel shroud, alumina reflector, core barrel and boron carbide neutron shield. The reactor is secured inside a below-grade cavity, with the operating floor located above the cavity. Example calculations are performed to show the plant response and MELCOR capabilities to characterize a range of accident conditions. The accidents selected for evaluation consider a range of degraded and failed modes of operation for key safety functions providing re activity control, the primary and secondary system heat removal, and the effectiveness of th e confinement natural circulation flow into the reactor cavity (i.e., a flow blockage).

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

MELCOR Accident Progression and Source Term Demonstration Calculations for a HTGR

MELCOR is an integrated thermal hydraulics, accident progression, and source term code for reactor safety analysis that has been developed at Sandia National Laboratories for the United States Nuclear Regulatory Commission (NRC) since the early 1980s. Though MELCOR originated as a light water reactor (LWR) code, development and modernization efforts over the past decades have expanded its application scope to include non-LWR reactor concepts. Current MELCOR development efforts include providing the NRC with the analytical capabilities to support regulatory readiness for licensing non-LWR technologies under Strategy 2 of the NRC's near-term Implementation Action Plans. Beginning with the Next Generation Nuclear Project (NGNP), MELCOR ha s undergone a range of enhancements to provide analytical capabilities for modeling the spectrum of advanced non-LWR concepts. This report describes the generic plant model developed to demonstrate MELCOR capabilities to perform high-temperature gas reactor (HTGR) safety evaluations. The generic plant model is based on publicly available PMBR-400 design information. For plant aspects (e.g., reactor building size and leak rate) that are not described in the PBMR-400 references, the analysts made assumptions needed to construct a MELCOR full-plant model. The HTGR model uses a TRi-structural ISOtropic (TRISO)-particle fuel pebble-bed reactor with a primary system rejecting heat to a recuperative heat exchange r. Surrounding the reactor vessel is a reactor cavity contained within a confinement room cooled by the Reactor Cavity Cooling System (RCCS). Example calculations are performed to show the plant response and MELCOR capabilities to characterize a range of accident conditions. The accidents selected for evaluation consider a range of degraded and failed modes of operation for key safety functions providing reactivity control, primary system heat removal and reactor vessel decay heat removal, and confinement cooling.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Validation of OpenPronghorn for Periodic Hill Flow Separation

OpenPronghorn is an open-source, MOOSE-based thermal-hydraulics simulation tool used for advanced reactor analysis. As an open-source code, it offers a transparent framework for validating governing equations, assumptions, and numerical methods against established benchmarks. This study evaluates OpenPronghorn's RANS turbulence model against the ERCOFTAC Case 81 periodic hill benchmark, a standard test case for separated turbulent flow featuring curved-wall separation, recirculation, shear-layer development, and reattachment. Streamwise velocity profiles predicted by OpenPronghorn were compared to reference LES data at multiple x/h locations. Results show that OpenPronghorn captures the overall trend of the velocity profiles, but the largest discrepancies occur in the separated-flow region, where turbulence is highly anisotropic and strongly affected by adverse pressure gradients and wall curvature—conditions that are inherently difficult for standard RANS models to resolve. Future work will test alternative k-e model variants and correction terms to improve prediction accuracy in this region.

42 - ENGINEERING↗

The multi-assumption architecture and testbed (MAAT v1.0): R code for generating ensembles with dynamic model structure and analysis of epistemic uncertainty from multiple sources

Abstract. Here, computer models are ubiquitous tools used to represent systems across many scientific and engineering domains. For any given system, many computer models exist, each built on different assumptions and demonstrating variability in the ways in which these systems can be represented. This variability is known as epistemic uncertainty, i.e. uncertainty in our knowledge of how these systems operate. Two primary sources of epistemic uncertainty are (1) uncertain parameter values and (2) uncertain mathematical representations of the processes that comprise the system. Many formal methods exist to analyse parameter-based epistemic uncertainty, while process-representation-based epistemic uncertainty is often analysed post hoc, incompletely, informally, or is ignored. In this model description paper we present the multi-assumption architecture and testbed (MAAT v1.0) designed to formally and completely analyse process-representation-based epistemic uncertainty. MAAT is a modular modelling code that can simply and efficiently vary model structure (process representation), allowing for the generation and running of large model ensembles that vary in process representation, parameters, parameter values, and environmental conditions during a single execution of the code. MAAT v1.0 approaches epistemic uncertainty through sensitivity analysis, assigning variability in model output to processes (process representation and parameters) or to individual parameters. In this model description paper we describe MAAT and, by using a simple groundwater model example, verify that the sensitivity analysis algorithms have been correctly implemented. The main system model currently coded in MAAT is a unified, leaf-scale enzyme kinetic model of C 3 photosynthesis. In the Appendix we describe the photosynthesis model and the unification of multiple representations of photosynthetic processes. The numerical solution to leaf-scale photosynthesis is verified and examples of process variability in temperature response functions are provided. For rapid application to new systems, the MAAT algorithms for efficient variation of model structure and sensitivity analysis are agnostic of the specific system model employed. Therefore MAAT provides a tool for the development of novel or toy models in many domains, i.e. not only photosynthesis, facilitating rapid informal and formal comparison of alternative modelling approaches.

54 ENVIRONMENTAL SCIENCES↗

Reimagining Disassembly Interfaces With Visualization: Combining Instruction Tracing and Control Flow With DisViz

In applications where efficiency is critical, developers may examine their compiled binaries, seeking to understand how the compiler transformed their source code and what performance implications that transformation may have. This analysis is challenging due to the vast number of disassembled binary instructions and the many-to-many mappings between them and the source code. These problems are exacerbated as source code size increases, giving the compiler more freedom to map and disperse binary instructions across the disassembly space. Interfaces for disassembly typically display instructions as an unstructured listing or sacrifice the order of execution. Here, we design a new visual interface for disassembly code that combines execution order with control flow structure, enabling analysts to both trace through code and identify familiar aspects of the computation. Central to our approach is a novel layout of instructions grouped into basic blocks that displays a looping structure in an intuitive way. We add to this disassembly representation a unique block-based mini-map that leverages our layout and shows context across thousands of disassembly instructions. Finally, we embed our disassembly visualization in a web-based tool, DisViz, which adds dynamic linking with source code across the entire application. DizViz was developed in collaboration with program analysis experts following design study methodology and was validated through evaluation sessions with ten participants from four institutions. Participants successfully completed the evaluation tasks, hypothesized about compiler optimizations, and noted the utility of our new disassembly view. Our evaluation suggests that our new integrated view helps application developers in understanding and navigating disassembly code.

Computer science↗

wavepy - Python package for x-ray grating interferometry with applications in imaging and wavefront characterization

X-ray grating interferometry has been employed for a wide range of imaging applications by using the Talbot self-images of a grating. At synchrotron facilities, it has also been exploited to characterize the coherence and wavefront of the x-ray beam. The method is relatively straightforward, easy to implement, and provides accurate quantitative data. However, to exploit its full potential, it requires highly specialized, robust data analysis. It this work, we have set the framework for the development and dissemination of a robust open-source code that is tailored to the data analysis for imaging and beam characterization using grating interferometry.

Grizolli, Walan↗

Quantitative Analysis of Color Differences within High Contrast, Low Power Reversible Electrophoretic Displays

Here, quantitative color analysis is performed on videos of high contrast, low power reversible electrophoretic deposition (EPD)-based displays operated under different applied voltages. This analysis is coded in an open-source software, relies on a color differentiation metric, ΔE * 00 , derived from digital video, and provides an intuitive relationship between the operating conditions of the devices and their performance. Time-dependent ΔE * 00 color analysis reveals color relaxation behavior, recoverability for different voltage sequences, and operating conditions that can lead to optimal performance.

36 MATERIALS SCIENCE↗

Global Transformations for Legacy Parallel Applications via Structural Analysis and Rewriting

Performance and scalability optimization of large HPC applications is currently a labor-intensive, manual process with very low productivity. Major difficulties come from the disaggregated environment for HPC application development: the compiler is only involved in local decisions (core or multithreaded domain), while a library-based, communication-oriented programming model realizes whole-machine parallelism. Realizing any major global change in such a disaggregated environment is very difficult and involves changing large portions of the source code. We present semi-automated techniques, based on structural analysis and rewriting, for performing global transformations on an HPC application source code. We present two case studies using the Self-Consistent Field (SCF) standalone benchmark as well as the Coupled Cluster (CCSD) module (2.9 million lines of Fortran code), a key module of the NWChem computational chemistry application. We demonstrate how structural rewriting techniques can be used to automate transformations that affect multiple sections of the application's source code. We show that the transformations can be applied in a systematic fashion across the source code bases with minimal manual effort. These transformations improve the scalability of the SCF benchmark by more than two orders of magnitude and the performance of the full CCSD module by a factor of 4.0.

legacy parallel applications↗