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 109 records · Page 6

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↗

Structural tailoring of engine blades (STAEBL)

Mathematical optimization is applied to the design of gas turbine fan blades. The automated procedure replaces the current manual process which requires experience and intuition on the part of the designer to achieve successful blade designs. The optimization procedure that is developed utilizes the COPES/CONMIN optimization code. Approximate vibration and stress analyses are used for the optimization process. Analysis recalibrations are achieved through the application of more detailed, refined analysis. Optimizations of a hollow titanium fan blade with composite inlays and of a superhybrid composite blade are demonstrated.

Brown, K. W.↗

An application of compound scaling to wind tunnel model design

An approach was developed for the stiffness design of aeroelastically scaled wind tunnel models. The object of designing such models is to make a structure whose stiffness matches a desired stiffness distribution. This design problem is cast as a formal constrained optimization problem and worked with two different optimization methods. A previous effort used the modified method of feasible directions (MFD) as implemented in a general purpose finite element based optimization code. In this effort, a special purpose finite element based optimization program was written and run using both MFD and compound scaling optimization methods. Results are presented comparing the final designs obtained using MFD and compound scaling.

French, Mark↗

A finite element code for electric motor design

FEMOT is a finite element program for solving the nonlinear magnetostatic problem. This version uses nonlinear, Newton first order elements. The code can be used for electric motor design and analysis. FEMOT can be embedded within an optimization code that will vary nodal coordinates to optimize the motor design. The output from FEMOT can be used to determine motor back EMF, torque, cogging, and magnet saturation. It will run on a PC and will be available to anyone who wants to use it.

Campbell, C. Warren↗

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↗

Performance Enhancements for the Lattice-Boltzmann Solver in the LAVA Framework

Performance enhancements in NASA's recently developed Lattice Boltzmann solver within the Launch Ascent and Vehicle Aerodynamics (LAVA) framework are presented. Two key algorithmic developments are highlighted. A coarse-fine interface treatment that discretely conserves mass and momentum has been implemented and successfully verified and validated. Code optimizations targeting improved serial and parallel performance were presented. For a simple turbulent Taylor-Green Vortex problem, we were able to demonstrate a 2.3 times speedup over the baseline code for a single Skylake-SP node containing 40 physical cores, and a 2.14 times speedup for 64 nodes containing 2560 physical cores. In addition, we were able to show that the optimizations enabled us to scale the code almost perfectly to 20480 physical cores where, including ghost cells, the problem size was 10 billion cells.

Barad, Michael↗

Performance Enhancements for the Lattice-Boltzmann Solver in the LAVA Framework

Performance enhancements in NASA's recently developed Lattice Boltzmann solver within the Launch Ascent and Vehicle Aerodynamics (LAVA) framework are presented. Two key algorithmic developments are highlighted. A coarse-fine interface treatment that discretely conserves mass and momentum has been implemented and successfully verified and validated. Code optimizations targeting improved serial and parallel performance were presented. For a simple turbulent Taylor-Green Vortex problem, we were able to demonstrate a 2.3 times speedup over the baseline code for a single Skylake-SP node containing 40 physical cores, and a 2.14 times speedup for 64 nodes containing 2560 physical cores. In addition, we were able to show that the optimizations enabled us to scale the code almost perfectly to 20480 physical cores where, including ghost cells, the problem size was 10 billion cells.

LAVA↗

Design optimization studies using COSMIC NASTRAN

The purpose of this study is to create, test and document a procedure to integrate mathematical optimization algorithms with COSMIC NASTRAN. This procedure is very important to structural design engineers who wish to capitalize on optimization methods to ensure that their design is optimized for its intended application. The OPTNAST computer program was created to link NASTRAN and design optimization codes into one package. This implementation was tested using two truss structure models and optimizing their designs for minimum weight, subject to multiple loading conditions and displacement and stress constraints. However, the process is generalized so that an engineer could design other types of elements by adding to or modifying some parts of the code.

Pitrof, Stephen M.↗

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↗

Trajectories for High Specific Impulse High Specific Power Deep Space Exploration

Preliminary results are presented for two methods to approximate the mission performance of high specific impulse high specific power vehicles. The first method is based on an analytical approximation derived by Williams and Shepherd and can be used to approximate mission performance to outer planets and interstellar space. The second method is based on a parametric analysis of trajectories created using the well known trajectory optimization code, VARITOP. This parametric analysis allows the reader to approximate payload ratios and optimal power requirements for both one-way and round-trip missions. While this second method only addresses missions to and from Jupiter, future work will encompass all of the outer planet destinations and some interstellar precursor missions.

Polsgrove, T.↗