Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “code optimization”

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 55 records · Page 3

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↗

Homological stabilizer codes

In this paper we define homological stabilizer codes on qubits which encompass codes such as Kitaev's toric code and the topological color codes. These codes are defined solely by the graphs they reside on. This feature allows us to use properties of topological graph theory to determine the graphs which are suitable as homological stabilizer codes. We then show that all toric codes are equivalent to homological stabilizer codes on 4-valent graphs. We show that the topological color codes and toric codes correspond to two distinct classes of graphs. We define the notion of label set equivalencies and show that under a small set of constraints the only homological stabilizer codes without local logical operators are equivalent to Kitaev's toric code or to the topological color codes. - Highlights: Black-Right-Pointing-Pointer We show that Kitaev's toric codes are equivalent to homological stabilizer codes on 4-valent graphs. Black-Right-Pointing-Pointer We show that toric codes and color codes correspond to homological stabilizer codes on distinct graphs. Black-Right-Pointing-Pointer We find and classify all 2D homological stabilizer codes. Black-Right-Pointing-Pointer We find optimal codes among the homological stabilizer codes.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

MONKES: a fast neoclassical code for the evaluation of monoenergetic transport coefficients in stellarator plasmas

Abstract MONKES is a new neoclassical code for the evaluation of monoenergetic transport coefficients in stellarators. By means of a convergence study and benchmarks with other codes, it is shown that MONKES is accurate and efficient. The combination of spectral discretization in spatial and velocity coordinates with block sparsity allows MONKES to compute monoenergetic coefficients at low collisionality, in a single core, in approximately one minute. MONKES is sufficiently fast to be integrated into stellarator optimization codes for direct optimization of the bootstrap current and to be included in predictive transport suites. The code and data from this paper are available at https://github.com/JavierEscoto/MONKES/ .

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Recent advances in stellarator optimization

Computational optimization has revolutionized the field of stellarator design. To date, optimizations have focused primarily on optimization of neoclassical confinement and ideal MHD stability, although limited optimization of other parameters has also been performed. Here, we outline a select set of new concepts for stellarator optimization that, when taken as a group, present a significant step forward in the stellarator concept. One of the criticisms that has been leveled at existing methods of design is the complexity of the resultant field coils. Recently, a new coil optimization code—COILOPT++, which uses a spline instead of a Fourier representation of the coils,—was written and included in the STELLOPT suite of codes. The advantage of this method is that it allows the addition of real space constraints on the locations of the coils. The code has been tested by generating coil designs for optimized quasi-axisymmetric stellarator plasma configurations of different aspect ratios. As an initial exercise, a constraint that the windings be vertical was placed on large major radius half of the non-planar coils. Further constraints were also imposed that guaranteed that sector blanket modules could be removed from between the coils, enabling a sector maintenance scheme. Results of this exercise will be presented. New ideas on methods for the optimization of turbulent transport have garnered much attention since these methods have led to design concepts that are calculated to have reduced turbulent heat loss. We have explored possibilities for generating an experimental database to test whether the reduction in transport that is predicted is consistent with experimental observations. Thus, a series of equilibria that can be made in the now latent QUASAR experiment have been identified that will test the predicted transport scalings. Fast particle confinement studies aimed at developing a generalized optimization algorithm are also discussed. A new algorithm developed for the design of the scraper element on W7-X is presented along with ideas for automating the optimization approach.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

A Performance-Portable MultiGPU Implementation of 3D Euler Equations using ProtoX and IRIS

Computational scientists often face challenges when developing and optimizing code for high-performance computing (HPC), especially when trying to leverage GPUs. Given the heterogeneity of the nodes that comprise many modern HPC facilities, considerable demand exists for performance portable solutions for the core computational kernels used in many scientific computing libraries. In this work, we demonstrate a fourth-order finite volume method–based implementation of the Euler equations, which are an integral part of computational fluid dynamics. Our performance-portable multiGPU implementation for Euler equations uses ProtoX to generate kernels and IRIS for portability. ProtoX is a domain-specific language that uses a structured-grid partial differential equation library called Proto as its front end and the SPIRAL code generation system as its back end to generate optimized kernels for different architectures. Optimized kernels generated by ProtoX are orchestrated through the IRIS intelligent runtime system to provide portability. Two levels of optimizations within the IRIS runtime— directed acyclic graph fusion and task fusion—are explored to efficiently utilize computing resources in a multiGPU environment. Performance improvement through these optimizations is showcased by comparing the base ProtoX-IRIS implementation on AMD GPUs (Frontier node) and on NVIDIA GPUs (NVIDIA DGX-1).

Mankad, Het↗

GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning

Large language models (LLMs) are increasingly adapted to downstream tasks via reinforcement learning (RL) methods like Group Relative Policy Optimization (GRPO), which often require thousands of rollouts to learn new tasks. We argue that the interpretable nature of language often provides a much richer learning medium for LLMs, compared to policy gradients derived from sparse, scalar rewards. To test this, we introduce GEPA (Genetic-Pareto), a prompt optimizer that thoroughly incorporates natural language reflection to learn high-level rules from trial and error. Given any AI system containing one or more LLM prompts, GEPA samples trajectories (e.g., reasoning, tool calls, and tool outputs) and reflects on them in natural language to diagnose problems, propose and test prompt updates, and combine complementary lessons from the Pareto frontier of its own attempts. As a result of GEPA's design, it can often turn even just a few rollouts into a large quality gain. Across six tasks, GEPA outperforms GRPO by 6% on average and by up to 20%, while using up to 35x fewer rollouts. GEPA also outperforms the leading prompt optimizer, MIPROv2, by over 10% (e.g., +12% accuracy on AIME-2025), and demonstrates promising results as an inference-time search strategy for code optimization. We release our code at https://github.com/gepa-ai/gepa.

97 MATHEMATICS AND COMPUTING↗

Kokkos GPU Compiler

The Kokkos Clang compiler is a version of the Clang C++ compiler that has been modified to perform targeted code generation for Kokkos constructs in the goal of generating highly optimized code and to provide semantic (domain) awareness throughout the compilation toolchain of these constructs such as parallel for and parallel reduce. This approach is taken to explore the possibilities of exposing the developer’s intentions to the underlying compiler infrastructure (e.g. optimization and analysis passes within the middle stages of the compiler) instead of relying solely on the restricted capabilities of C++ template metaprogramming. To date our current activities have focused on correct GPU code generation and thus we have not yet focused on improving overall performance. The compiler is implemented by recognizing specific (syntactic) Kokkos constructs in order to bypass normal template expansion mechanisms and instead use the semantic knowledge of Kokkos to directly generate code in the compiler’s intermediate representation (IR); which is then translated into an NVIDIA-centric GPU program and supporting runtime calls. In addition, by capturing and maintaining the higher-level semantics of Kokkos directly within the lower levels of the compiler has the potential for significantly improving the ability of the compiler to communicate with the developer in the terms of their original programming model/semantics.

Moss, Nicholas↗

Kokkos GPU Compiler

The Kokkos Clang compiler is a version of the Clang C++ compiler that has been modified to perform targeted code generation for Kokkos constructs in the goal of generating highly optimized code and to provide semantic (domain) awareness throughout the compilation toolchain of these constructs such as parallel for and parallel reduce. This approach is taken to explore the possibilities of exposing the developer’s intentions to the underlying compiler infrastructure (e.g. optimization and analysis passes within the middle stages of the compiler) instead of relying solely on the restricted capabilities of C++ template metaprogramming. To date our current activities have focused on correct GPU code generation and thus we have not yet focused on improving overall performance. The compiler is implemented by recognizing specific (syntactic) Kokkos constructs in order to bypass normal template expansion mechanisms and instead use the semantic knowledge of Kokkos to directly generate code in the compiler’s intermediate representation (IR); which is then translated into an NVIDIA-centric GPU program and supporting runtime calls. In addition, by capturing and maintaining the higher-level semantics of Kokkos directly within the lower levels of the compiler has the potential for significantly improving the ability of the compiler to communicate with the developer in the terms of their original programming model/semantics.

Moss, Nicholas↗

A Computational Tool Compatible with NEAMS Code Packages for Optimizing the Shape of Nuclear Reactor Components and of Whole Core Performance

We designed and implemented a shape optimization tool that functions with NEAMS codes, and that nuclear scientists and engineers can employ to optimize the shape of individual components and the whole core under the applicable single- or multi-physics model comprising the employed code(s). The shape-optimization tool enables varying the geometric shape itself as well as its dimensions to yield, potentially, new component designs that are not limited by the designer’s intuition and previous experience. In cases where the optimal-shape object is an individual component, we provide the capability for additional verification that the whole-core performance using the optimized component performs better, under the prescribed optimization criteria, than the initial design. Our shape-optimization tool couples to NEAMS codes via a flexible input- composer interface and enables the user to constrain the shape’s evolution to ensure the component’s manufacturability. Finally, we demonstrate our shape-optimization tool with single- and multi-physics NEAMS codes. This objective is motivated by the recent advances in manufacturing technology that, combined with rising interest in novel reactor concepts, are creating new opportunities for innovation in the design of individual components that affect the performance of the full reactor system. In particular, Additive Manufacturing (AM) enables mass production of highly precise, intricate and complex component shapes that are not feasible with traditional manufacturing techniques. To accomplish this goal we developed and implemented in MOOSE: (1) discrete shape optimization capability based on a state-space search that uses Artificial Intelligence strategies to find the optimal state/shape; (2) smooth shape optimization tool that employs PETSc’s toolkit for advanced optimization (TAO) to optimize node-displacement of the components’ model sidesets; (3) hierarchical core optimization workflow that recognizes the repeating patterns typical in a nuclear reactor and performs the optimization one level at a time with increasing length scale. Each of these tools is equipped with user-specified constraints to avoid optimal shapes that are not manufacturable. The developed shape optimization tool is verified and demonstrated on various nuclear reactor core components and models. The optimization process accounts for tightly coupled physics that govern the behavior of these target reactors, and exercises several NEAMS codes in a coupled multiphysics fashion. The impact of the delivered shape optimization tool will materialize in the optimal design, from the outset, of advanced reactors currently contemplated to regain the US’s leadership in nuclear energy R&D. Novel reactor concepts, e.g. Molten Salt Reactors, and sizes/capacities, e.g. micro- reactors, provide a unique opportunity to optimize performance from the early stages of development, before the investment in components’ production lines, validation experiments, and licensing regimes make future improvements in performance prohibitively expensive and force sub-optimal performance on the affected reactor concept in perpetuity. This benefit will be realized by the delivered shape optimization tool regardless of the applicable manufacturing process whether traditional or AM, thereby broadening the impact of this project on current and future reactor concepts and technologies

11 - NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

SU-E-T-424: Dosimetric Verification of Modulated Electron Radiation Therapy Delivered Using An Electron Specific Multileaf Collimator for Treatment of Scalp Cases

Purpose: Modulated electron radiotherapy (MERT) has the potential to achieve better treatment outcome for shallow tumors such as those of breast and scalp. In a separate study with scalp lesions, MERT was compared to volumetric modulated arc therapy. Our results showed a reduction in the dose reaching the brain with MERT. However dose calculation accuracy and delivery efficiency challenges remain. Thus in the current study we proceed to add more cases to demonstrate MERT beneficial outcome and its delivery accuracy using an electron specific multileaf collimator (eMLC). Methods: We have used the MCBEAM code for treatment head simulation and for generating phase space files to be used as radiation source input for our Monte Carlo based treatment planning system (MC TPS). MCPLAN code is used for calculation of patient specific dose deposition coefficient and for final MERT plan dose calculation. An in-house developed optimization code is used for the optimization process. MERT plans were generated for real patients and head and neck phantom. Film was used for dosimetric verification. The film was cut following the contour of the curved phantom surface and then sealed with black masking tape. In the measurement, the sealed film packet was sandwiched between two adjacent slabs of the head and neck phantom. The measured 2D dose distribution was then compared with calculations. Results: The eMLC allows effective treatment of scalps with multi-lesions spreading around the patient head, which was usually difficult to plan or very time consuming with conventional applicators. MERT continues to show better reduction in the brain dose. The dosimetric measurements showed slight discrepancy, which was attributed to the film setup. Conclusion: MERT can improve treatment plan quality for patients with scalp cancers. Our in-house MC TPS is capable of performing treatment planning and accurate dose calculation for MERT using the eMLC.

60 APPLIED LIFE SCIENCES↗

SU-E-T-595: Design of a Graphical User Interface for An In-House Monte Carlo Based Treatment Planning System: Planning and Contouring Tools

Purpose: An in-house Monte Carlo based treatment planning system (MC TPS) has been developed for modulated electron radiation therapy (MERT). Our preliminary MERT planning experience called for a more user friendly graphical user interface. The current work aimed to design graphical windows and tools to facilitate the contouring and planning process. Methods: Our In-house GUI MC TPS is built on a set of EGS4 user codes namely MCPLAN and MCBEAM in addition to an in-house optimization code, which was named as MCOPTIM. Patient virtual phantom is constructed using the tomographic images in DICOM format exported from clinical treatment planning systems (TPS). Treatment target volumes and critical structures were usually contoured on clinical TPS and then sent as a structure set file. In our GUI program we developed a visualization tool to allow the planner to visualize the DICOM images and delineate the various structures. We implemented an option in our code for automatic contouring of the patient body and lungs. We also created an interface window displaying a three dimensional representation of the target and also showing a graphical representation of the treatment beams. Results: The new GUI features helped streamline the planning process. The implemented contouring option eliminated the need for performing this step on clinical TPS. The auto detection option for contouring the outer patient body and lungs was tested on patient CTs and it was shown to be accurate as compared to that of clinical TPS. The three dimensional representation of the target and the beams allows better selection of the gantry, collimator and couch angles. Conclusion: An in-house GUI program has been developed for more efficient MERT planning. The application of aiding tools implemented in the program is time saving and gives better control of the planning process.

60 APPLIED LIFE SCIENCES↗

Effective Vectorization with OpenMP 4.5

This paper describes how the Single Instruction Multiple Data (SIMD) model and its extensions in OpenMP work, and how these are implemented in different compilers. Modern processors are highly parallel computational machines which often include multiple processors capable of executing several instructions in parallel. Understanding SIMD and executing instructions in parallel allows the processor to achieve higher performance without increasing the power required to run it. SIMD instructions can significantly reduce the runtime of code by executing a single operation on large groups of data. The SIMD model is so integral to the processor s potential performance that, if SIMD is not utilized, less than half of the processor is ever actually used. Unfortunately, using SIMD instructions is a challenge in higher level languages because most programming languages do not have a way to describe them. Most compilers are capable of vectorizing code by using the SIMD instructions, but there are many code features important for SIMD vectorization that the compiler cannot determine at compile time. OpenMP attempts to solve this by extending the C++/C and Fortran programming languages with compiler directives that express SIMD parallelism. OpenMP is used to pass hints to the compiler about the code to be executed in SIMD. This is a key resource for making optimized code, but it does not change whether or not the code can use SIMD operations. However, in many cases critical functions are limited by a poor understanding of how SIMD instructions are actually implemented, as SIMD can be implemented through vector instructions or simultaneous multi-threading (SMT). We have found that it is often the case that code cannot be vectorized, or is vectorized poorly, because the programmer does not have sufficient knowledge of how SIMD instructions work.

97 MATHEMATICS AND COMPUTING↗

Potential Ideas for an El Capitan Center of Excellence (COE) Around Intelligent Simulation

Proposing a Center of Excellence under the CORAL-2 NRE is a mandatory requirement. The current Sierra COE (CORAL-1) is largely focused on helping LLNL applications make the disruptive transition to a heterogeneous GPU-based system by 2018. We expect a continuation of COE activities around optimizing our broad and diverse application base (of so-called “traditional” simulation codes) optimized for the El Capitan architecture, as well as supporting the underlying software stack (compilers, tools, programming models, etc.) – but do not expect this to require as much effort in the El Capitan COE (assuming a heterogeneous node architecture). What follows are some thoughts on 3 potential topics of interest for an El Capitan COE at LLNL – largely focused around AI and machine learning and the concept of advancing our goal of intelligent simulation or cognitive computing in the timeframe of deployment and production use of El Capitan (2023-2038). We believe vendor engagement through a COE in this area will provide a natural point-of-interest between LLNL and our vendor partner for common advancement of machine learning capabilities focused on scientific data – potentially greatly broadening the ecosystem around HPC architectures and the supporting software stack for scientific simulation-based AI.

97 MATHEMATICS AND COMPUTING↗

HPC-enabled computation of demand models at scale

The purpose of this project is to examine the energy impact of urban-scale traffic for the Los Angeles Basin by developing and implementing a scalable traffic assignment model. An energy optimization function will be posed and when integrated into the optimization code for travel assignment it can be mathematically proven to converge. The energy optimization function can then be compared to the typical travel time optimization that is traditionally used in traffic assignment models. The analysis will begin with static traffic assignment models with the routing for all origin and destinations computed in parallel on high performance computing facilities. Convergence of the numerical methods rely on the solution of convex programs (or extensions of these). This step will mostly consist of demonstrating the ability to parallelize the Frank Wolfe algorithm on various platforms.

29 ENERGY PLANNING, POLICY, AND ECONOMY↗

HPC4Mobilty w/ UCB

The purpose of this project is to examine the energy impact of urban-scale traffic for the Los Angeles Basin by developing and implementing a scalable traffic assignment model. An energy optimization function will be posed and when integrated into the optimization code for travel assignment it can be mathematically proven to converge. The energy optimization function can then be compared to the typical travel time optimization that is traditionally used in traffic assignment models. The analysis will begin with static traffic assignment models with the routing for all origin and destinations computed in parallel on high performance computing facilities. Convergence of the numerical methods rely on the solution of convex programs (or extensions of these). This step will mostly consist of demonstrating the ability to parallelize the Frank Wolfe algorithm on various platforms. This work will contribute to LBNL’s efforts to develop new processes, analytical tools, program designs, and business models to advance the state of the art in next-generation sustainable transportation solutions.

32 ENERGY CONSERVATION, CONSUMPTION, AND UTILIZATI↗

Design Choices for Thermofluid Flow Components and Systems that are Exported as Functional Mockup Units

This paper discusses design decisions for exporting Modelica thermofluid flow components as Functional Mockup Units. The purpose is to provide guidelines that will allow building energy simulation programs and HVAC equipment manufacturers to effectively use FMUs for modeling of HVAC components and systems. We provide an analysis for direct input-output dependencies of such components and discuss how these dependencies can lead to algebraic loops that are formed when connecting thermofluid flow components. Based on this analysis, we provide recommendations that increase the computing efficiency of such components and systems that are formed by connecting multiple components. We explain what code optimizations are lost when providing thermofluid flow components as FMUs rather than Modelica code. We present an implementation of a package for FMU export of such components, explain the rationale for selecting the connector variables of the FMUs and finally provide computing benchmarks for different design choices. It turns out that selecting temperature rather than specific enthalpy as input and output signals does not lead to a measurable increase in computing time, but selecting nine small FMUs rather than a large FMU increases computing time by 70%.

Wetter, Michael↗

Orca2

SAND2024-03236O Orca2 is a trajectory design and optimization code for constructing and solving problems numerically defined on homogeneous manifolds. Orca2 solves numerical trajectory design and optimization problems defined on Lie-type domains and operates primarily as a library requiring a user to write additional C++ code to leverage it. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Sparapany, Michael↗

DEPRECATED HARP_Opt: Horizontal Axis Rotor Performance Optimization [SWR-13-00]

DEPRECATED This repository was archived by the owner on Jun 30, 2026. It is now read-only. HARP_Opt (Horizontal Axis Rotor Performance Optimization) utilizes MATLAB's optimization algorithms and the National Renewable Energy Laboratory's (NREL) WT-Perf blade element momentum (BEM) code to design axial-flow wind and water (i.e. hydrokinetic) turbine rotors. The code optimizes a rotor's performance for steady and uniform flows (no sheared or yawed flows). A variety of rotor control configurations can be designed using HARP_Opt, including fixed or variable rotor speed and fixed or variable blade pitch configuration. Blades with circular or non-circular roots are also supported.

Lawson, Michael↗