Search NASA⌕ Search

SEARCH · Search NASA

Results for “Control flow graph”

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.

CG-Kit: Code Generation Toolkit for performant and maintainable variants of source code applied to Flash-X hydrodynamics simulations

CG-Kit is a new Code Generation tool-Kit that we have developed as a part of the solution for portability and maintainability for multiphysics computing applications. The development of CG-Kit is rooted in the urgent need created by the shifting landscape of high-performance computing platforms and the algorithmic complexities of a particular large-scale multiphysics application: Flash-X. To efficiently use computing resources on a heterogeneous node, an application must have a map of computation to resources and a mechanism to move the data and computation to the resources according to the map. Most existing performance portability solutions are focussed on abstracting the expression of computations so that a unified source code can be specialized to run on different resources. However, such an approach is insufficient for a code like Flash-X, which has a multitude of code components that can be assembled in various permutations and combinations to form different instances of applications. Similar challenges apply to any code that has composability, where a single specified way of apportioning work among devices may not be optimal. Additionally, use cases arise where the optimal control flow of computation may differ for different devices while the underlying numerics remain identical. This combination leads to unique challenges including handling an existing large code base in Fortran and/or C/C++, subdivision of code into a great variety of units supporting a wide range of physics and numerical methods, different parallelization techniques for distributed and shared memory systems and accelerator devices, and heterogeneity of computing platforms requiring coexisting variants of parallel algorithms. All of these challenges demand that scientific software developers apply existing knowledge about domain applications, algorithms, and computing platforms to determine custom abstractions and granularity for code generation. There is a critical lack of tools to tackle those problems. CG-Kit is designed to fill this gap by providing a user with the ability to express their desired control flow and computation-to-resource map in the form a pseudocode-like recipe. It consists of standalone tools that can be combined into highly specific and, we argue, highly effective portability and maintainability toolchains. Here we present the design of our new tools: parametrized source trees, control flow graphs, and recipes. The tools are implemented in Python. They are agnostic to the programming language of the source code targeted for code generation. In conclusion, we demonstrate the capabilities of the toolkit with two examples, first, multithreaded variants of the basic AXPY operation, and second, variants of parallel algorithms within a hydrodynamics solver, called Spark, from Flash-X that operates on block-structured adaptive meshes.

Algorithmic portability↗

Can Large Language Models Understand Intermediate Representations?

Intermediate Representations (IRs) are essential in compiler design and program analysis, yet their comprehension by Large Language Models (LLMs) remains underexplored. This paper presents a pioneering empirical study to investigate the capabilities of LLMs, including GPT-4, GPT-3, Gemma 2, LLaMA 3.1, and Code Llama, in understanding IRs. We analyze their performance across four tasks: Control Flow Graph (CFG) reconstruction, decompilation, code summarization, and execution reasoning. Our results indicate that while LLMs demonstrate competence in parsing IR syntax and recognizing high-level structures, they struggle with control flow reasoning, execution semantics, and loop handling. Specifically, they often misinterpret branching instructions, omit critical IR operations, and rely on heuristic-based reasoning, leading to errors in CFG reconstruction, IR decompilation, and execution reasoning. The study underscores the necessity for IR-specific enhancements in LLMs, recommending fine-tuning on structured IR datasets and integration of explicit control flow models to augment their comprehension and handling of IR-related tasks.

Jiang, Hailong↗

LSAFE: a Lightweight Static Analysis Framework for binary Executables

Static analysis is a widely used technique for analyzing various aspects of programs. However, as programs become more complex, static analysis tools require larger resources, such as CPU time and memory, to perform the same tasks. Moreover, the source code of programs may not always be accessible, requiring static analysis to be performed on the binary executable code directly. To overcome these challenges, we propose a lightweight static analysis framework called LSAFE, which constructs control flow graphs (CFGs) and data dependency graphs (DDGs) of target programs with optimized performance in terms of CPU and memory usage. We evaluated the proposed framework using both Spec benchmark programs and real-world industrial applications, and found that it outperformed Angr, an existing state-of-the-art static analysis tool. Additionally, we demonstrate a case study that utilizes the CFG generated by LSAFE to detect memory leaks.

Qu, Guangzhi↗

SmartFuse: Reconfigurable Smart Switches to Accelerate Fused Collectives in HPC Applications

Communication switches have sometimes been augmented to process collectives (e.g., the IBM BlueGene project and the Mellanox SHArP switch). In this work, we find that there is a great acceleration opportunity through the further augmentation of switches to accelerate more complex functions that combine communication with computation. We consider three types of such functions. The first is fully-fused collectives built by fusing multiple existing collectives like Allreduce with Alltoall. The second is semi-fused collectives built by combining a collective with another computation. The third we refer to as higher-order collectives built by combining multiple computations and communications, such as to perform matrix-matrix multiply (PGEMM). In this work, we propose a framework called SmartFuse to accelerate fused collective functions. The core of SmartFuse is a reconfigurable smart switch to support these operations. The semi/fully fused collectives are implemented with a CGRAlike architecture, while higher-order collectives are implemented with a more specialized computational unit that can also schedule communication. Supporting our framework is software to evaluate and translate relevant parts of the input program, compile them into a control data flow graph, and then map this graph to the switch hardware. The proposed framework, once deployed, has the strong potential to accelerate existing HPC applications transparently by encapsulation within an MPI implementation. Experimental results show that this approach improves the performance of the PGEMM kernel, MINIFE, and AMG by, on average, 94%, 15%, and 13%, respectively.

Haghi, Pouya↗

Kinematic flow from the flow of cuts

The wavefunction coefficients of conformally coupled scalars in power-law FRW cosmologies satisfy differential equations governed by a set of simple combinatorial rules known as the kinematic flow. In this paper we derive the kinematic flow, expressed using a set of differential forms referred to as the cut basis, from a geometric perspective, relying solely on the cosmological hyperplane arrangement and without invoking bulk physics. Each element of the cut basis corresponds to the positive geometry associated to an independent cut of the physical FRW-form and can be labeled by decorating (minors of) the truncated Feynman graph with an acyclic orientation. We provide a straightforward prescription to associate a logarithmic differential form to each element of the cut basis by considering its corresponding decorated graph. Moreover, we show that the residues of the physical FRW-form are canonical forms of certain graphical zonotopes labeled by the same set of decorated graphs. These zonotopes control the cut combinatorics -- flow of cuts -- of the physical FRW-form and the cut basis (by construction). Using the theory of relative twisted cohomology and intersection theory, we derive a closed form formula for the differential equations of the cut basis. We also introduce combinatorial rules that compute the kinematic differential of any basis element without explicit calculation. The combinatorics of our differential equations is a natural consequence of the flow of cuts and is equivalent (up to rescaling) to the kinematic flow for the recently studied time integral basis. In particular, our differential equations decouple into exponentially many sectors, one for each way of cutting a subset of edges of the graph.

General Relativity and Quantum Cosmology↗

Intelligent Experiments through Real-Time AI: Fast Data Processing and Autonomous Detector Control for High-Energy Nuclear Experiments

The aim of this project is to develop software and hardware for fast real-time data processing and autonomous detector control and calibration for the sPHENIX and the future EIC experiments. Below summarizes Georgia Tech team efforts in the past year: 1. We developed a real-time clustering algorithm and FPGA-based pipeline architecture for processing fired pixel data from ALPIDE sensors in sPHENIX experiments. Our Columnar Clustering Co-Design introduces a hardware-aware, stream-friendly approach that segments pixel data by column pairs using a Column Pair Clustering (CPC) strategy, followed by Cluster Stitching to merge adjacent subclusters. Implemented in Vitis HLS, the pipeline comprises five stages—read-in, subclustering, stitching, analysis, and write-out—connected by tagged HLS streams with custom end-of-event signaling for robust synchronization. We designed a pipelined dataflow model optimized for throughput, low latency, and minimal buffering, enabling scalable clustering across events of arbitrary size. Our system maintains spatial precision via center-of-mass and shape key extraction and efficiently handles edge cases such as fragmented or nested clusters. Compared against DBSCAN in both software and hardware, our approach demonstrates competitive performance under FPGA constraints. 2. We also conducted a comprehensive algorithm-to-hardware co-design of connected component analysis tailored for sPHENIX experiments, focusing on real-time, low-latency processing using FPGAs and High-Level Synthesis (HLS). Starting from a Python-based particle tracking pipeline, the team translated the core logic—graph traversal via DFS and Union-Find—into an HLS-compatible C++ model, replacing dynamic memory and recursion with static arrays and pipelined control flow. The final design includes a fully streamed and dataflow-compatible Union-Find kernel optimized across five iterations, incorporating loop pipelining, array partitioning, AXI/FIFO interface tuning, and function flattening. Experimental results show up to 14.8× speedup over the CPU baseline, reducing per-graph latency to 1.58 μs and demonstrating strong resource efficiency with only ~7k LUTs and zero BRAM usage. The design maintains functional correctness against the Python reference using a Python-based C-simulation framework and Mean Squared Error metrics. This work validates the potential of HLS-driven FPGA designs for edge-level HEP data acquisition, laying a scalable foundation for future integration with real-time detector pipelines and multi-graph processing systems.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Stochastic finite volume method for uncertainty quantification of transient flow in gas pipeline networks

We develop a weakly intrusive framework to simulate the propagation of uncertainty in solutions of generic hyperbolic partial differential equation systems on graph-connected domains with nodal coupling and boundary conditions. The method is based on the Stochastic Finite Volume (SFV) approach and can be applied for uncertainty quantification (UQ) of the dynamical state of fluid flow over actuated transport networks. The numerical scheme has specific advantages for modeling intertemporal uncertainty in time-varying boundary parameters, which cannot be characterized by strict upper and lower (interval) bounds. We describe the scheme for a single pipe, and then formulate the controlled junction Riemann problem (JRP) that enables the extension to general network structures. In conclusion, we demonstrate the method's capabilities and performance characteristics using a standard benchmark test network.

97 MATHEMATICS AND COMPUTING↗

GridSTIX

SF-25-112 Grid-STIX is a comprehensive extension of the STIX (Structured Threat Information Expression) 2.1 ontology specifically designed for electrical grid cybersecurity applications. This ontology provides a standardized, machine-readable framework for modeling grid assets, operational technology devices, threats, vulnerabilities, supply chain risks, and security relationships in electrical power systems. ## Key Features - **Comprehensive Grid Coverage**: Physical assets, OT devices, grid components, sensors, and energy storage systems - **Zero Trust Architecture**: Policy decision points, enforcement points, trust brokers, and continuous monitoring - **AMI Infrastructure**: Advanced metering networks, head-end systems, mesh gateways, and MDM systems - **Advanced Security Modeling**: Attack patterns, vulnerabilities, mitigations, and supply chain risks - **Critical Grid Relationships**: Power flow, protection, control, and synchronization relationships - **Supply Chain Security**: Supplier modeling, country of origin tracking, and risk assessment - **Protocol Support**: DNP3, Modbus, IEC 61850, IEC 60870-5-104, OPC-UA, and IEEE standards - **Python Code Generation**: Automated STIX-compliant Python class generation from ontologies - **Interactive Visualization**: Enhanced HTML network graphs with grid-specific categorization - **STIX 2.1 Compliance**: Full compatibility with STIX threat intelligence ecosystem

Blakely, Benjamin [Argonne National Laboratory (AN↗

Learning the factors controlling mineral dissolution in three-dimensional fracture networks: applications in geologic carbon sequestration

We perform a set of high-fidelity simulations of geochemical reactions within three-dimensional discrete fracture networks (DFN) and use various machine learning techniques to determine the primary factors controlling mineral dissolution. The DFN are partially filled with quartz that gradually dissolves until quasi-steady state conditions are reached. At this point, we measure the quartz remaining in each fracture within the domain as our primary quantity of interest. We observe that a primary sub-network of fractures exists, where the quartz has been fully dissolved out. This reduction in resistance to flow leads to increased flow channelization and reduced solute travel times. However, depending on the DFN topology and the rate of dissolution, we observe substantial variability in the volume of quartz remaining within fractures outside of the primary subnetwork. This variability indicates an interplay between the fracture network structure and geochemical reactions. We characterize the features controlling these processes by developing a machine learning framework to extract their relevant impact. Specifically, we use a combination of high-fidelity simulations with a graph-based approach to study geochemical reactive transport in a complex fracture network to determine the key features that control dissolution. We consider topological, geometric and hydrological features of the fracture network to predict the remaining quartz in quasi-steady state. We found that the dissolution reaction rate constant of quartz and the distance to the primary sub-network in the fracture network are the two most important features controlling the amount of quartz remaining. This study is a first step towards characterizing the parameters that control carbon mineralization using an approach with integrates computational physics and machine learning.

54 ENVIRONMENTAL SCIENCES↗

An integrated approach to optimizing concentration shock wave electrodialysis using 2D multicell simulation and response surface models

Shock wave electrodialysis (SWED) is a highly promising technique for energy-efficient ion separation in the context of a circular economy. This paper presents a approach way of modeling and improving SWED using a two-dimensional multicell model combined with the COMSOL program and response surface methodology. The model integrates the Nernst-Planck equation, Darcy's law, and first-order electroosmosis to examine the local concentration, flux of ionic species, distribution of current, and velocity of flow in SWED cells under various operating conditions. We first illustrate the clear depiction of concentration, velocity, and electric potential distribution through contours which aids in identifying optimal operating conditions and designing scalable SWED systems. The results emphasize the significance of surface charge density and voltage in influencing the features of shock waves for obtaining effective ion separation while optimizing energy consumption and improving current efficiency by controlling the retention time of feed flow. Here, this study defines two crucial characteristics of shock waves, namely the length of the flat depletion zone of a fully developed shock wave (shock wave height) and the distance of shock wave propagation (shock wave length). These properties significantly impact separation performance, as determined by the simulation results. Additionally, the response surface methodology is incorporated with the COMSOL models to develop predictive models and graph responses, enabling a more comprehensive understanding of the interactions between parameters and performance indicators, such as removal ratio, energy consumption, and water recovery. Finally, this work suggests design tactics for expanding SWED processes and outlines potential areas for further research. This research provides valuable insights into the prospective applications, design optimization, and scalability of SWED in the field of electrokinetic separation technologies for green chemistry and a circular economy.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Improving Trustworthiness of Data-Driven Power Grid Contingency Analysis With Bayesian Residual Graph Neural Networks

The evolving energy landscape requires novel tools to efficiently perform contingency analysis and reliability assessment of power grids, potentially in real-time. The high computational cost of traditional power flow solvers limits their applicability in practice. Machine learning (ML) surrogates such as deep neural networks (NNs) accelerate power flow solvers computations, enabling high-order contingency analysis and real-time decision-making by learning highly nonlinear functions and integrating grid topology via graph architectures. However, (graph) NNs lack predictive power away from training data and do not provide predictive confidence estimates. Here, we present a Bayesian residual graph NN that integrates knowledge from low-fidelity data via residual training and embeds granular quantification of uncertainties, improving trustworthiness critical for high-consequence decision-making. Applying Bayesian concepts to NNs is challenging due to the high-dimensionality of both the parameter space, complicating derivation of a meaningful prior, and the output space in large grid systems, requiring enhanced techniques to assess the predicted high-dimensional uncertainties. Our contributions include: (1) Deriving a prior for fully connected and graph NNs that leverages low-fidelity data to guide mean predictions and appropriately control prior predictive uncertainty. (2) Integrating this prior within an ensembling with anchoring scheme for efficient approximate posterior inference. (3) Deriving enhanced metrics to assess accuracy of both the mean and uncertainty predictions in high dimensions, appropriately accounting for correlations propagated through graph layers. The resulting Bayesian residual graph NN is tested on a contingency analysis task for 14-bus and 118-bus grids.

24 - POWER TRANSMISSION AND DISTRIBUTION↗

Solid State Quantum Refrigeration Superconducting, Absorption and Measurement Based (Final Technical Report)

During this DOE grant, DE-SC0017890, in place for the past six years, all proposed research was carried out and published in peer-reviewed papers, as well as other projects that emerged during the research. In that effort the research team accomplished all proposed research, as well as many closely related research projects discovered and conceived of during the grant. These works included “Efficient Quantum Measurement Engines”, a work published in Physical Review Letters, giving a theory of quantum measurement-based engines, which uses quantum measurement as a resource. These engines are designed to efficiently convert energy from the stochastic quantum measurement process into useful work. Further publications include “Experimental Realization of a Quantum Dot Energy Harvester”, a joint theory and experimental work in collaboration with the group of Charles Smith in Cambridge, UK, as well as long time theoretical collaborators, Rafael Sánchez and Björn Sothmann. This work, featured as an Editor’s Suggestion in Physical Review Letters, realized an earlier theoretical proposal of ours, whereby two resonant tunneling quantum dots are connected to a central electronic cavity that is heated by a hot energy source. We also published “Superconducting Quantum Refrigerator: Breaking and Rejoining Cooper Pairs with Magnetic Field Cycles” a work done in collaboration with experimentalist Francesco Giazotto from ENS Pisa, Italy, which also resulted in a patent. This paper, published in Phys. Rev. Applied, advanced the concept of a cyclic fridge based on the normal/superconducting phase transition together with layered materials separated by tunnel junctions. We also completed the proposed research on a heat transistor, publishing “Thermal transistor and thermometer based on Coulomb-coupled conductors”, carried out as a collaboration between my group and theorists Splettstoesser (Lund U., Sweden), Sothmann (U. Duisburg-Essen, Germany), and Sánchez (U. Autónoma de Madrid, Spain). We carried out an analysis of a quantum coupled to a quantum point contact as a sensitive thermometer and heat transistor. We found the optimal statistical estimator for the temperature and compared it with experiments on the same type of devices. We also investigated autonomous quantum absorption refrigerators using quantum dots to cool by using a very hot thermal reservoir to drive heat between two other reservoirs. In the article “Quantifying the quantum heat contribution from a driven superconducting circuit”, we demonstrated that for a driven superconducting circuit, we showed heat flow provided by a hot source to the qubit can be switched on and off by varying external parameters, the frequency and the intensity of the driving. In the work “Stochastic thermodynamic cycles of a mesoscopic thermoelectric engine”, we reconsidered the autonomous thermoelectric heat engine in terms of underlying cycles. Rather than periodic behavior, the cycles were stochastic in nature. Nevertheless, by undertaking a graph theoretical analysis of the elementary transport processed, great quantitative and qualitative insight could be found. We also considered the quantum measurement process and showed that a quantum version of Maxwell’s demon could be related to the work extraction of a quantum system, closely related to arrow-of-time measures for quantum measurement, as described in our article “Thermodynamics of quantum measurement and Maxwell's demon's arrow of time”. This work was selected in Phys. Rev. A as an Editor’s Suggestion. A recent preprint titled “Cyclic Superconducting Quantum Refrigerators Using Guided Fluxon Propagation” accomplished an important piece of this grant: to propose a new kind of quantum refrigerator using the dynamics of fluxons in a type II superconductor. This invention envisioned a race-track type geometry where fluxons are confined. By applying a gradient of magnetic field together with electric current in a Corbino geometry, the circulating fluxons can actively cool a cold reservoir, realizing a new type of cyclic superconducting refrigerator. We also investigated the possibility of thermal control from different points of view. The application of quantum measurement to the system gives a new kind of control on the system of interest – we have pioneered this approach and shown that measurement can boost the thermal power of quantum engines as described in “Continuous measurement boosted adiabatic quantum thermal machines”. The ability to have heat flows on demand is an outstanding challenge, and we have provided new solutions to this problem in Thermal control across a chain of electronic nanocavities” for a chain of electron cavities using gating voltage control. The control methods using qubit/qubit coupling to create absorption fridges at their most fundamental level have also been developed.

75 CONDENSED MATTER PHYSICS, SUPERCONDUCTIVITY AND↗