Search NASA⌕ Search

SEARCH · Search NASA

Results for “code refactoring”

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 37 records · Page 2

High-performance computing in water resources hydrodynamics

In this work, we present a vision of future water resources hydrodynamics codes that can fully utilize the strengths of modern high-performance computing. The advances to computing power, formerly driven by the improvement of central processing unit processors, now focus on parallel computing and, in particular, the use of graphics processing units (GPUs). However, this shift to a parallel framework requires refactoring the code to make efficient use of the data as well as changing even the nature of the algorithm that solves the system of equations. These concepts along with other features such as the precision for the computations, dry regions management, and input/output data are analyzed in this paper. A 2D multi-GPU flood code applied to a large-scale test case is used to corroborate our statements and ascertain the new challenges for the next-generation parallel water resources codes.

54 ENVIRONMENTAL SCIENCES↗

Axially-deformed solution of the Skyrme-Hartree-Fock-Bogoliubov equations using the transformed harmonic oscillator basis (IV) HFBTHO (v4.0): A new version of the program

We describe the new version 4.0 of the code HFBTHO that solves the nuclear Hartree-Fock-Bogoliubov problem by using the deformed harmonic oscillator basis in cylindrical coordinates. In the new version, we have implemented the restoration of rotational, particle number, and reflection symmetry for even-even nuclei. The restoration of rotational symmetry does not require using bases closed under rotation. Furthermore, we added the SeaLL1 functional and improved the calculation of the Coulomb potential. Finally, we refactored the code to facilitate maintenance and future developments.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

UQpy v4.1: Uncertainty quantification with Python

This paper presents the latest improvements introduced in Version 4 of the UQpy, Uncertainty Quantification with Python, library. In the latest version, the code was restructured to conform with the latest Python coding conventions, refactored to simplify previous tightly coupled features, and improve its extensibility and modularity. To improve the robustness of UQpy, software engineering best practices were adopted. A new software development workflow significantly improved collaboration between team members, and continuous integration and automated testing ensured the robustness and reliability of software performance. Continuous deployment of UQpy allowed its automated packaging and distribution in system agnostic format via multiple channels, while a Docker image enables the use of the toolbox regardless of operating system limitations.

97 MATHEMATICS AND COMPUTING↗

Modernization and optimization of a legacy open-source CFD code for high-performance computing architectures

Legacy codes remain a crucial element of today's simulation-based engineering ecosystem due to the extensive validation process and investment in such software. The rapid evolution of high-performance computing architectures necessitates the modernization of these codes. One approach to modernization is a complete overhaul of the code. However, this could require extensive investments, such as rewriting in modern languages, new data constructs, etc., which will necessitate systematic verification and validation to re-establish the credibility of the computational models. The current study advocates using a more incremental approach and is a culmination of several modernization efforts of the legacy code MFIX, which is an open-source computational fluid dynamics code that has evolved over several decades, widely used in multiphase flows and still being developed by the National Energy Technology Laboratory. Two different modernization approaches,‘bottom-up’ and ‘top-down’, are illustrated. Here, preliminary results show up to 8.5x improvement at the selected kernel level with the first approach, and up to 50% improvement in total simulated time with the latter were achieved for the demonstration cases and target HPC systems employed.

97 MATHEMATICS AND COMPUTING↗

Optimizing the Weather Research and Forecasting Model with OpenMP Offload and Codee

Currently, the Weather Research and Forecasting model (WRF) utilizes shared memory (OpenMP) and distributed memory (MPI) parallelisms. To take advantage of GPU resources on the Perlmutter supercomputer at NERSC, we port parts of the computationally expensive routine Fast Spectral Bin Microphysics (FSBM) to NVIDIA GPUs using OpenMP device offloading directives. To facilitate this process, we explore a workflow for optimization which uses both runtime profilers and a static code inspection tool Codee to refactor the subroutine. We observe an 2.24x overall speedup for the CONUS-12km storm test case.

Wichitrnithed, Chayanon (Namo) [Odin Institute]↗

Progress Towards Accelerating the Unified Model on Hybrid Multi-Core Systems

The cloud microphysics scheme, CASIM, and the radiation scheme, SOCRATES, are two computationally intensive parts within the Met Office's Unified Model (UM). This study enables CASIM and SOCRATES to use accelerated multi-core systems for optimal computational performance of the UM. Using profiling to guide our efforts, we refactored the code for optimal threading and kernel arrangement and implemented OpenACC directives manually or through the CLAW source-to-source translator. Initial porting results achieved 10.02x and 9.25x speedup in CASIM and SOCRATES respectively on 1 GPU compared with 1 CPU core. A granular performance analysis of the strategy and bottlenecks are discussed. These improvements will enable UM to run on heterogeneous computers and a path forward for further improvements is provided.

Zhang, Wei↗

Building Performance Database API (BPD API) v2.1

The Building Performance Database (BPD) is the largest publicly-available source of measured energy performance data for buildings in the United States. It contains information about the building's energy use, location, and physical and operational characteristics. The BPD can be used by building owners, operators, architects and engineers to compare a building's energy efficiency against customized peer groups, identify energy efficiency opportunities, and set energy efficiency targets. It can also be used by energy efficiency program implementers and policymakers to analyze energy efficiency features and trends in the building stock. The BPD compiles data from various data sources, converts it into a standard format, cleanses and quality checks the data, and provides users with access to the data in a way that maintains anonymity for data providers. This software is the database and the Application Programming Interface (API). Users can utilize the BPD's data to develop their own applications using the API. Version 2.1 included a major update for multiple years of data and refactoring of code for faster queries.

Mathew, Paul↗

ExactPack

A new version of the verification tool ExactPack, 1.7.0, includes three new solvers: A Radshocks solver, Riemann solver and an Elastic-Plastic Piston problem solver. The code has been refactored to work with Python 3. All Fortran code has been removed and solvers implemented in Fortran have been re-implemented in Python where necessary. All unit tests have been converted to use the Pytest format and all the GUI, CLI and verification analysis code has been removed.

Thrussell, Jasper↗

(U) New xRage Capabilities Enabled by Infrastructure Cleanup

For the past several years, the Eulerian Applications Project at LANL has been working to modernize the xRage code base. Initial efforts, done in FY15-16 and presented in previous work, focused primarily on splitting the code into meaningful packages and levelizing the dependency structure. Ongoing efforts include further refactoring across packages, code cleanup within packages, and writing of unit tests (Fig. 1). When we started the modernization process, one of our major goals was to simplify the code base and enable future code changes, in support of advanced architectures and also of new physics methods. As a result, several recent xRage improvements have been enabled by this infrastructure cleanup. This paper describes some of these improvements, and the infrastructure cleanup tasks that enabled them.

97 MATHEMATICS AND COMPUTING↗

Electron transport in gaseous detectors with a Python-based Monte Carlo simulation code

Understanding electron drift and diffusion in gases and gas mixtures is a topic of central importance for the development of modern particle detection instrumentation. The industry-standard MagBoltz code has become an invaluable tool during its 20 years of development, providing capability to solve for electron transport (‘swarm’) properties based on a growing encyclopedia of built-in collision cross sections. We have made a refactorization of this code from FORTRAN into Cython, and studied a range of gas mixtures of interest in high energy and nuclear physics. The results from the new open source PyBoltz package match the outputs from the original MagBoltz code, with comparable simulation speed. An extension to the capabilities of the original code is demonstrated, in implementation of a new Modified Effective Range Theory interface. We hope that the versatility afforded by the new Python code-base will encourage continued use and development of the MagBoltz tools by the particle physics community.

97 MATHEMATICS AND COMPUTING↗

Developing an ELM Ecosystem Dynamics Model on GPU with OpenACC

Porting a complex scientific code, such as the E3SM land model (ELM), onto a new computing architecture is challenging. The paper presents design strategies and technical approaches to develop an ELM ecosystem dynamics model with compiler directives (OpenACC) on NVIDIA GPUs. The code has been refactored with advanced OpenACC features (such as deepcopy and routine directives) to reduce memory consumption and to increase the levels of parallelism through parallel loop reconstruction and new data structures. As a result, the optimized parallel implementation achieved more than a 140-time speedup (50 ms vs 7600 ms), compared to a naive implementation that uses OpenACC routine directive and parallelizes the code across existing loops on a single NVIDIA V100. On a fully loaded computing node with 44 CPUs and 6 GPUs, the code achieved over a 3.0-times speedup, compared to the original code on the CPU. Furthermore, the memory footprint of the optimized parallel implementation is 300 MB, which is around 15% of the 2.15 GB of memory consumed by a naive implementation. This study is the first effort to develop the ELM component on GPUs efficiently to support ultra-high-resolution land simulations at continental scales.

Schwartz, Peter↗

Developing Ultrahigh-Resolution E3SM Land Model for GPU Systems

Designing and refactoring complex scientific code, such as the E3SM land model (ELM), for new computing architectures is challenging. This paper presents design strategies and technical approaches to develop a data-oriented, GPU-ready ELM model using compiler directives (OpenACC/OpenMP). We first analyze the datatypes and processes in the original ELM code. Then we present design considerations for ultrahigh-resolution ELM (uELM) development for massive GPU systems. These techniques include the global data-oriented simulation workflow, domain partition, code porting and data copy, memory reduction, parallel loop restructure and flattening, and race condition detection. We implemented the first version of uELM using OpenACC targeting the NVidia GPUs in the Summit supercomputer at Oak Ridge National Laboratory. During the implementation, we developed a software tool (named SPEL) to facilitate code generation, verification, and performance tuning using these techniques. The first uELM implementation for Nvidia GPUs on Summit delivered promising results: 1) over 98% of the ELM code was automatically generated and tuned by scripts. Most ELM modules had better computational performances than the original ELM code for CPUs. The GPU-ready uELM is more scalable than the CPU code on fully-loaded Summit nodes. Example profiling results from several modules are also presented to illustrate the performance improvements and race condition detection. The lessons learned and toolkit developed in the study are also suitable for further uELM deployment using OpenMP on the first US exascale computer, Frontier, equipped with AMD CPUs and GPUs.

Schwartz, Peter↗

The Trinity Center of Excellence Co-Design Best Practices

Co-design between application developers and the vendors providing high-performance computing systems is essential to efficiently using current-generation HPC systems and shaping next-generation architectures. Application developers are faced with the challenge of effectively orchestrating many hardware threads and exploiting vector instructions, which can require code modifications. Will refactoring applications for current-generation systems apply to future-generation systems? Is there help available for this enormous task? Over the past 10 years, a partnership has evolved to address these issues. Centers of Excellence are mutually beneficial collaborations between application developers and vendors; vendors receive a better understanding of the needs of their users, and users receive a better understanding of the characteristics of the hardware, system software, and tools available to address their challenges. Lastly, this article describes the partnership between two vendors, Cray and Intel, and the application teams working together in the Trinity Center of Excellence.

97 MATHEMATICS AND COMPUTING↗

Improving FERRY: Visualization, Refactoring, and Testing

The Frontier Experiment RegistRY System (FERRY) is a metadata database that contains information about employees, the groups and experiments they belong to, and grid mapping and quota management for the Fermi National Accelerator Laboratory. It is predominantly used to acquire user information. FERRY is accessed through the use of APIs (Application Programming Interface), shown in Figure 1. Corresponding attributes are then displayed for the user in JSON (Java Script Object Notation) format. The goal of this project has been to build upon and improve aspects of FERRY. Including the refactoring of the code, building a visual interface, and creating a testing system for FERRY’s APIs.

Segura, Antonio Thomas↗

Performance Versus Maintainability: A Case Study of Scream on Frontier

The Simple Cloud-Resolving E3SM Atmosphere Model (Scream) won the inaugural ACM Gordon Bell Prize for Climate Modeling. While most of Scream is portable Kokkos code, the Gordon-Bell runs did include tuning specifically for Frontier, the exascale computer at Oak Ridge National Laboratory. Production science runs use the same high-level configuration of Scream, but the tuned kernels do not meet the software standards necessary to merge into the production code base. This work describes experiments to refactor these kernels to meet the maintainability requirements of the production Scream code base while preserving high performance.

White, Trey↗

MDSplus quality improvement project

MDSplus is a data acquisition and analysis system used worldwide predominantly in the fusion research community. Development began 29 years ago on the OpenVMS operating system. Since that time there have been many new features added and the code has been ported to many different operating systems. There have been contributions to the MDSplus development from the fusion community in the way of feature suggestions, feature implementations, documentation and porting to different operating systems. The bulk of the development and support of MDSplus, however, has been provided by a relatively small core developer group of three or four members. Given the size of the development team and the large number of users much more effort was focused on providing new features for the community than on keeping the underlying code and documentation up to date with the evolving software development standards. To ensure that MDSplus will continue to provide the needs of the community in the future, the MDSplus development team along with other members of the MDSplus user community has commenced on a major quality improvement project. The planned improvements include changes to software build scripts to better use GNU Autoconf and Automake tools, refactoring many of the source code modules using new language features available in modern compilers, using GNU MinGW-w64 to create MS Windows distributions, migrating to a more modern source code management system, improvement of source documentation as well as improvements to the www.mdsplus.org web site documentation and layout, and the addition of more comprehensive test suites to apply to MDSplus code builds prior to releasing installation kits to the community. This paper should lead to a much more robust product and establish a framework to maintain stability as more enhancements and features are added. Finally, this paper will describe these efforts that are either in progress or planned for the near future.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

ISiCLE: A Quantum Chemistry Pipeline for Establishing in Silico Collision Cross Section Libraries

High throughput, comprehensive, and confident identifications of metabolites and other chemicals in biological and envi-ronmental samples will revolutionize our understanding of the role of these intriguing and chemically diverse molecules in biological systems. Despite recent technological advances, a metabolomics study still results in the detection of a dispropor-tionate number of features than cannot be confidently assigned to a chemical structure. This inadequacy is driven by the sin-gle most significant limitation in metabolomics: the reliance on reference libraries constructed through the analysis of au-thentic reference chemicals and the limited commercial availability of these compounds. To this end, we have developed the in silico chemical library engine (ISiCLE), a high-performance computing-friendly cheminformatics workflow for generating chemical properties. In the instantiation described here, we predict probable three-dimensional molecular conformers (i.e. conformational isomers) using chemical identifiers as input, from which collision cross sections (CCS) are derived. The ap-proach employs state-of-the-art first-principles simulation, distinguished by use of molecular dynamics, quantum chemistry, and ion mobility calculations to generate predictions, all without training data. Importantly, optimization of ISiCLE includ-ed a refactoring of the popular MOBCAL code for trajectory-based mobility calculations, improving its computational effi-ciency by over two orders of magnitude. Calculated CCS values were validated against 1,983 experimental CCS values and compared to previously reported CCS calculation approaches. Average CCS calculation absolute error is 3.2% with standard deviation 3.1%. An online database is introduced for sharing both calculated and experimental CCS values (metabolom-ics.pnnl.gov), initially including a CCS library with over 0.8M entries. Finally, three successful applications of molecule characterization using calculated CCS are described, including the identification of an environmental degradation product, the separation of molecular isomers, and the decoding of complex blinded mixtures of exposure chemicals. This work represents a promising method to address the limitations of small molecule identification, and offers alternatives to standards-based chemical identification amenable to high-performance computation.

metabolomics, standards-free, collision cross sect↗

ISiCLE: A Quantum Chemistry Pipeline for Establishing in Silico Collision Cross Section Libraries

High throughput, comprehensive, and confident identifications of metabolites and other chemicals in biological and envi-ronmental samples will revolutionize our understanding of the role of these intriguing and chemically diverse molecules in biological systems. Despite recent technological advances, a metabolomics study still results in the detection of a dispropor-tionate number of features than cannot be confidently assigned to a chemical structure. This inadequacy is driven by the sin-gle most significant limitation in metabolomics: the reliance on reference libraries constructed through the analysis of au-thentic reference chemicals and the limited commercial availability of these compounds. To this end, we have developed the in silico chemical library engine (ISiCLE), a high-performance computing-friendly cheminformatics workflow for generating chemical properties. In the instantiation described here, we predict probable three-dimensional molecular conformers (i.e. conformational isomers) using chemical identifiers as input, from which collision cross sections (CCS) are derived. The ap-proach employs state-of-the-art first-principles simulation, distinguished by use of molecular dynamics, quantum chemistry, and ion mobility calculations to generate predictions, all without training data. Importantly, optimization of ISiCLE includ-ed a refactoring of the popular MOBCAL code for trajectory-based mobility calculations, improving its computational effi-ciency by over two orders of magnitude. Calculated CCS values were validated against 1,983 experimental CCS values and compared to previously reported CCS calculation approaches. Average CCS calculation absolute error is 3.2% with standard deviation 3.1%. An online database is introduced for sharing both calculated and experimental CCS values (metabolom-ics.pnnl.gov), initially including a CCS library with over 0.8M entries. Finally, three successful applications of molecule characterization using calculated CCS are described, including the identification of an environmental degradation product, the separation of molecular isomers, and the decoding of complex blinded mixtures of exposure chemicals. This work represents a promising method to address the limitations of small molecule identification, and offers alternatives to standards-based chemical identification amenable to high-performance computation.

Colby, Sean M↗