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 235 records · Page 13

The Optimized Parallel MOC module in Code cosLATC

A new neutron transport lattice physics code, cosLATC, which is an essential part in COSINE (Core and System Integrated Engine) code package, has been developed by SPICRI. It is mainly used for 2-D transport calculations on Pressurized Water Reactor (PWR) assemblies or pin cells. cosLATC generates few group constants for the core physics code cosCORE in COSINE package. With regards to cross-section data, WIMS-D 69 and 281 energy groups library is employed currently. cosLATC also has capability of resonance treatment, depletion and fuel temperature calculation. cosLATC uses modular tracking and parallelization technique in MOC transport calculation, which can save lots of memory and running time. In this paper, MOC module in cosLATC are introduced, the accuracy and efficiency of the module are verified by C5G7 benchmark and a PWR typical assembly. (authors)

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

Optimization and Portability of a Fusion OpenACC-based FORTRAN HPC Code from NVIDIA to AMD GPUs

NVIDIA has been the main provider of GPU hardware in HPC systems for over a decade. Most applications that benefit from GPUs have thus been developed and optimized for the NVIDIA software stack. Recent exascale HPC systems are, however, introducing GPUs from other vendors, e.g. with the AMD GPU-based OLCF Frontier system just becoming available. AMD GPUs cannot be directly accessed using the NVIDIA software stack, and require a porting effort by the application developers. This paper provides an overview of our experience porting and optimizing the CGYRO code, a widely-used fusion simulation tool based on FORTRAN with OpenACC-based GPU acceleration. While the porting from the NVIDIA compilers was relatively straightforward using the CRAY compilers on the AMD systems, the performance optimization required more fine-tuning. In the optimization effort, we uncovered code sections that had performed well on NVIDIA GPUs, but were unexpectedly slow on AMD GPUs. After AMD-targeted code optimizations, performance on AMD GPUs has increased to meet our expectations. Modest speed improvements were also seen on NVIDIA GPUs, which was an unexpected benefit of this exercise.

Sfiligoi, Igor↗

Physics basis for design of 3D coils in tokamaks

Recent progress in 3D tokamak modeling is now leveraged to create a conceptual design of new external 3D field coils for the DIII-D tokamak. In this work generalized perturbed equilibrium code is used to determine optimally efficient spectrum for driving total, core, and edge neoclassical toroidal viscosity torque. These fundamental modes of 3D control are shown to have consistent outboard structures across a wide variety of plasma scenarios and machines. Given these target spectra, the currents and 3D geometry of multiple coils can be optimized to increase efficient drive for the physics of interest without undesired secondary effects. Here, this nonlinear optimization is demonstrated using the flexible optimized coils using space-curves code. The optimized coils are individually distorted in space, creating toroidal 'arrays' containing a variety of shapes that often wrap around a significant poloidal extent of the machine. Importantly, efficient coupling can be maintained even when enforcing large distances between coils and the plasma during the geometric optimization of coil designs. Finally, the physics-driven optimization presented here thus provides a practical path to utilizing coils built on the exterior of the vacuum chamber in future reactors to obtain the powerful 3D field benefits demonstrated on current machines with close, internal coils.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Phase-engineered bosonic quantum codes

Continuous-variable systems protected by bosonic quantum codes have emerged as a promising platform for quantum information. To date, the design of code words has centered on optimizing the state occupation in the relevant basis to generate the distance needed for error correction. Here, we show tuning the phase degree of freedom in the design of code words can affect, and potentially enhance, the protection against Markovian errors that involve excitation exchange with the environment. As illustrations, we first consider phase engineering bosonic codes with uniform spacing in the Fock basis that correct excitation loss with a Kerr unitary and show that these modified codes feature destructive interference between error code words and, with an adapted “two-level” recovery, the error protection is significantly enhanced. We then study protection against energy decay with the presence of mode nonlinearities and analyze the role of phase for optimal code designs. As a result, we extend the principle of phase engineering to bosonic codes defined in other bases and multiqubit codes, demonstrating its broad applicability in quantum error correction.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Topology-Aware Performance Optimization and Modeling of Adaptive Mesh Refinement Codes for Exascale

Here, we introduce a topology-aware performance optimization and modeling workflow for AMR simulation that includes two new modeling tools, ProgrAMR and Mota Mapper, which interface with the BoxLib AMR framework and the SSTmacro network simulator. ProgrAMR allows us to generate and model the execution of task dependency graphs from high-level specifications of AMR-based applications, which we demonstrate by analyzing two example AMR-based multigrid solvers with varying degrees of asynchrony. Mota Mapper generates multiobjective, network topology-aware box mappings, which we apply to optimize the data layout for the example multigrid solvers. While the sensitivity of these solvers to layout and execution strategy appears to be modest for balanced scenarios, the impact of better mapping algorithms can be significant when performance is highly constrained by network hop latency. Furthermore, we show that network latency in the multigrid bottom solve is the main contributing factor preventing good scaling on exascale-class machines.

97 MATHEMATICS AND COMPUTING↗

Topology Optimization for Porous Electrodes

This code is for the topology optimization of porous electrodes. It was used to produce the results in Roy, T., Salazar de Troya, M.A., Worsley, M.A. and Beck, V.A., 2021. Topology optimization for the design of porous electrodes. arXiv preprint arXiv:2111.12059.

Roy, Thomas↗

Performance Optimization of a Beam Dynamics PIC Code On Hybrid Computer Architectures

The self-consistent multi-particle tracking based on particle-in-cell method (PIC) has been widely used in particle accelerator beam dynamics study. However, the PIC simulation is time-consuming and needs to use modern parallel computers for high resolution applications. In this paper, we implemented and optimized a parallel beam dynamics PIC code on two types of hybrid parallel computer architectures: one is the GPU and GPU cluster, while the other is the "Knight Landing" CPU cluster.

Liu, Zhicong↗

TU-AB-BRC-12: Optimized Parallel MonteCarlo Dose Calculations for Secondary MU Checks

Purpose: Secondary MU checks are an important tool used during a physics review of a treatment plan. Commercial software packages offer varying degrees of theoretical dose calculation accuracy, depending on the modality involved. Dose calculations of VMAT plans are especially prone to error due to the large approximations involved. Monte Carlo (MC) methods are not commonly used due to their long run times. We investigated two methods to increase the computational efficiency of MC dose simulations with the BEAMnrc code. Distributed computing resources, along with optimized code compilation, will allow for accurate and efficient VMAT dose calculations. Methods: The BEAMnrc package was installed on a high performance computing cluster accessible to our clinic. MATLAB and PYTHON scripts were developed to convert a clinical VMAT DICOM plan into BEAMnrc input files. The BEAMnrc installation was optimized by running the VMAT simulations through profiling tools which indicated the behavior of the constituent routines in the code, e.g. the bremsstrahlung splitting routine, and the specified random number generator. This information aided in determining the most efficient compiling parallel configuration for the specific CPU’s available on our cluster, resulting in the fastest VMAT simulation times. Our method was evaluated with calculations involving 10{sup 8} – 10{sup 9} particle histories which are sufficient to verify patient dose using VMAT. Results: Parallelization allowed the calculation of patient dose on the order of 10 – 15 hours with 100 parallel jobs. Due to the compiler optimization process, further speed increases of 23% were achieved when compared with the open-source compiler BEAMnrc packages. Conclusion: Analysis of the BEAMnrc code allowed us to optimize the compiler configuration for VMAT dose calculations. In future work, the optimized MC code, in conjunction with the parallel processing capabilities of BEAMnrc, will be applied to provide accurate and efficient secondary MU checks.

60 APPLIED LIFE SCIENCES↗

Optimization of artificial viscosity in production codes based on Gaussian Regression surrogate models

To accurately model flows with shock waves using staggered-grid Lagrangian hydrodynamics, artificial viscosity has to be introduced to convert kinetic energy into internal energy, thereby increasing the entropy across shocks. Determining the appropriate strength of the artificial viscosity is an art and strongly depends on the particular problem and experience of the researcher. The objective of this study is to pose the problem of finding the appropriate strength of artificial viscosity as an optimization problem and solve this problem using machine learning (ML) tools, specifically using surrogate models based on Gaussian Process regression and Bayesian analysis. We describe the optimization method and discuss various practical details of its implementation. The shock-containing problems for which we apply this method all have been implemented in the LANL code FLAG. First, we apply ML to find optimal values to isolated shock problems of different strengths. Second, we apply ML to optimize viscosity for a 1D propagating detonation problem based on Zel’dovich-von Neumann-Doring (ZND) detonation theory using a reactive burn model. We compare results for default (currently used values in FLAG) and optimized values of artificial viscosity for these problems demonstrating the potential for significant improvement in the accuracy of computations.

42 ENGINEERING↗

rlmolecule: A library for general-purpose material and molecular optimization using AlphaZero-style reinforcement learning

This library includes in-progress code for the optimization of materials and molecules using reinforcement learning. This project seeks to develop a generalized machine learning approach for optimizing targeted, and often complex, functional properties over the space of possible material structures, allowing faster identification of promising candidates. Electronic and transport properties of materials are determined by their molecular structure (for molecules) or their crystal structure (for in-organic crystalline materials). The atomic composition, bonding, and 3-D-spatial arrangement in these systems therefore represent a vast, discontinuous search space for optimal candidates. This library implements AlphaZero style reinforcement learning applied to two worked examples: the optimization of stable organic radicals for redox flow batteries, and the determination of stable electrolyte species for solid state batteries. The current code contains proof-of-concept results run on the Eagle HPC system, while the completed package will be a flexible tool for material optimization across of number of energy-relevant fields, which leverages cloud compute resources for the majority of the computational heavy lifting.

Biagioni, David↗

PolyMat: an efficient Matlab code for multi-material topology optimization

We introduce a Matlab implementation of topology optimization for compliance minimization on unstructured polygonal finite element meshes that efficiently accommodates many materials and many volume constraints. Leveraging the modular structure of the educational code, PolyTop, we extend it to the multi-material version, PolyMat, with only a few modifications. First, a design variable for each candidate material is defined in each finite element. Next, we couple a Discrete Material Optimization interpolation with the existing penalization and introduce a new parameter such that we can employ continuation and smoothly transition from a convex problem without any penalization to a non-convex problem in which material mixing and intermediate densities are penalized. Mixing that remains due to the density filter operation is eliminated via continuation on the filter radius. To accommodate flexibility in the volume constraint definition, the constraint function is modified to compute multiple volume constraints and the design variable update is modified in accordance with the Zhang-Paulino-Ramos Jr. (ZPR) update scheme, which updates the design variables associated with each constraint independently. The formulation allows for volume constraints controlling any subset of the design variables, i.e., they can be defined globally or locally for any subset of the candidate materials. Borrowing ideas for mesh generation on complex domains from PolyMesher, we conclude which design variables are associated with each local constraint of arbitrary geometry. A number of examples are presented to demonstrate the many material capability, the flexibility of the volume constraint definition, the ease with which we can accommodate passive regions, and how we may use local constraints to break symmetries or achieve graded geometries.

79 ASTRONOMY AND ASTROPHYSICS↗

HERCULES: A Pattern Driven Code Transformation System

New parallel computers are emerging, but developing efficient scientific code for them remains difficult. A scientist must manage not only the science-domain complexity but also the performance-optimization complexity. HERCULES is a code transformation system designed to help the scientist to separate the two concerns, which improves code maintenance, and facilitates performance optimization. The system combines three technologies, code patterns, transformation scripts and compiler plugins, to provide the scientist with an environment to quickly implement code transformations that suit his needs. Unlike existing code optimization tools, HERCULES is unique in its focus on user-level accessibility. In this paper we discuss the design, implementation and an initial evaluation of HERCULES.

99 GENERAL AND MISCELLANEOUS↗

Optimized finite-build stellarator coils using automatic differentiation

A new stellarator coil design code is introduced that optimizes the position and winding pack orientation of finite-build coils. The new code, called flexible optimized curves in space using automatic differentiation (AD) and finite build (FOCUSADD), performs gradient-based optimization in a high-dimensional, non-convex space. The derivatives with respect to parameters of finite-build coils are easily and efficiently computed using AD. FOCUSADD parametrizes coil positions in free space using a Fourier series and uses a multi-filament approximation to the coil winding pack. The orientation of the winding pack is parametrized with a Fourier series and can be optimized as well. Optimized finite-build coils for a Wendelstein 7-X (W7-X)-like stellarator are found, and compared with filamentary coil results. The final positions of optimized finite-build W7-X-like coils are shifted, on average, by approximately 2.5 mm relative to optimized filamentary coils. These results suggest that finite-build effects should be accounted for in the optimization of stellarators with low coil tolerances.

43 PARTICLE ACCELERATORS↗

HERCULES: A Pattern Driven Code Transformation System

New parallel computers are emerging, but developing efficient scientific code for them remains difficult. A scientist must manage not only the science-domain complexity but also the performance-optimization complexity. HERCULES is a code transformation system designed to help the scientist to separate the two concerns, which improves code maintenance, and facilitates performance optimization. The system combines three technologies, code patterns, transformation scripts and compiler plugins, to provide the scientist with an environment to quickly implement code transformations that suit his needs. Unlike existing code optimization tools, HERCULES is unique in its focus on user-level accessibility. In this paper we discuss the design, implementation and an initial evaluation of HERCULES.

Computer Science↗

An X-ray Intensity Operations Monitor (AXIOM) (Final LDRD Project Report)

The Saturn accelerator has historically lacked the capability to measure time-resolved spectra for its 3-ring bremsstrahlung x-ray source. This project aimed to create a spectrometer called AXIOM to provide this capability. The project had three major development pillars: hardware, simulation, and unfold code. The hardware consists of a ring of 24 detectors around an existing x-ray pinhole camera. The diagnostic was fielded on two shots at Saturn and over 100 shots at the TriMeV accelerator at Idaho Accelerator Center. A new Saturn x-ray environment simulation was created using measured data to validate. This simulation allows for timeresolved spectra computation to compare the experimental results. The AXIOM-Unfold code is a new parametric unfold code using modern global optimizers and uncertainty quantification. The code was written in Python, uses Gitlab version control and issue tracking, and has been developed with long term code support and maintenance in mind.

43 PARTICLE ACCELERATORS↗

Fast optimization and dose calculation in scanned ion beam therapy

Purpose: Particle therapy (PT) has advantages over photon irradiation on static tumors. An increased biological effectiveness and active target conformal dose shaping are strong arguments for PT. However, the sensitivity to changes of internal geometry complicates the use of PT for moving organs. In case of interfractionally moving objects adaptive radiotherapy (ART) concepts known from intensity modulated radiotherapy (IMRT) can be adopted for PT treatments. One ART strategy is to optimize a new treatment plan based on daily image data directly before a radiation fraction is delivered [treatment replanning (TRP)]. Optimizing treatment plans for PT using a scanned beam is a time consuming problem especially for particles other than protons where the biological effective dose has to be calculated. For the purpose of TRP, fast optimization and fast dose calculation have been implemented into the GSI in-house treatment planning system (TPS) TRiP98. Methods: This work reports about the outcome of a code analysis that resulted in optimization of the calculation processes as well as implementation of routines supporting parallel execution of the code. To benchmark the new features, the calculation time for therapy treatment planning has been studied. Results: Compared to the original version of the TPS, calculation times for treatment planning (optimization and dose calculation) have been improved by a factor of 10 with code optimization. The parallelization of the TPS resulted in a speedup factor of 12 and 5.5 for the original version and the code optimized version, respectively. Hence the total speedup of the new implementation of the authors' TPS yielded speedup factors up to 55. Conclusions: The improved TPS is capable of completing treatment planning for ion beam therapy of a prostate irradiation considering organs at risk in this has been overseen in the review process. Also see below 6 min.

60 APPLIED LIFE SCIENCES↗

Study of reference burnup steps optimization in fuel segment data file generation for NEXUS/ANC9 code system

For any two-step core design code system, the cross-section files are the primary factor to determine the accuracy of the system prediction. For a once-through cross-section system to cover all potential applicable conditions, the system may need to perform tens of thousands state points of lattice calculations. These calculations take a significant amount of CPU times and computing power, especially when a fine or ultra-fine energy group library is used. As computer power increases, so does the calculational complexity. Therefore, it is important to make the lattice calculations effective and efficient. Based on the Westinghouse core design code system NEXUS/ANC9, this work focuses on the reference burnup steps used by the lattice code when performing the calculations. Following the fundamental cross-section methodology and analyzing the contribution of each individual terms, this study provides an applicable solution of the optimized reference burnup steps. The test results show that, with the existing cross-section methodology, it is possible to significantly reduce the lattice calculation cases and cross-section file generation time without sacrificing the accuracy of system prediction. (authors)

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Performance modeling of microsecond scale biological molecular dynamics simulations on heterogeneous architectures

Performance improvements in biomolecular simulations based on molecular dynamics (MD) codes are widely desired. Unfortunately, the factors, which allowed past performance improvements, particularly the microprocessor clock frequencies, are no longer increasing. Hence, novel software and hardware solutions are being explored for accelerating performance of widely used MD codes. In this paper, we describe our efforts on porting, optimizing and tuning of Large-scale Atomic/Molecular Massively Parallel Simulator, a popular MD framework, on heterogeneous architectures: multi-core processors with graphical processing unit (GPU) accelerators. Our implementation is based on accelerating the most computationally expensive non-bonded interaction terms on the GPUs and overlapping the computation on the CPU and GPUs. This functionality is built on top of message passing interface that allows multi-level parallelism to be extracted even at the workstation level with the multi-core CPUs and allows extension of the implementation on GPU-enabled clusters. We hypothesize that the optimal benefit of heterogeneous architectures for applications will come by utilizing all possible resources (for example, CPU-cores and GPU devices on GPU-enabled clusters). Benchmarks for a range of biomolecular system sizes are provided, and an analysis is performed on four generations of NVIDIA's GPU devices. On GPU-enabled Linux clusters, by overlapping and pipelining computation and communication, we observe up to 10-folds application acceleration in multi-core and multi-GPU environments illustrating significant performance improvements. Detailed analysis of the implementation is presented that allows identification of bottlenecks in algorithm, indicating that code optimization and improvements on GPUs could allow microsecond scale simulation throughput on workstations and inexpensive GPU clusters, putting widely desired biologically relevant simulation time-scales within reach of a large user community. In order to systematically optimize simulation throughput and to enable performance prediction, we have developed a parameterized performance model that will allow developers and users to explore the performance potential of future heterogeneous systems for biological simulations.

Agarwal, Pratul K.↗