Search NASA⌕ Search

SEARCH · Search NASA

Results for “code portability”

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

Accelerated kinetic model for global macro stability studies of high-beta fusion reactors

The field reversed configuration (FRC), such as studied in the C-2W experiment at TAE Technologies, is an attractive candidate for realizing a nuclear fusion reactor. In an FRC, kinetic ion effects play the majority role in macroscopic stability, which allows global stability studies to make use of fluid-kinetic hybrid (also referred to as Ohm's law) models wherein ions are treated kinetically while electrons are treated as a fluid. The development and validation of such a hybrid particle-in-cell algorithm in the Exascale Computing Project code WarpX are reported here. Implementation of this model in the WarpX framework benefits from the numerical efficiency of WarpX as well as its scalability on large HPC systems and portability to different architectures. Performance benchmarks of the new algorithm for large, 3-dimensional, full device simulations from the Perlmutter supercomputer are presented. Results of a series of FRC simulations are discussed in which the impact of two-fluid effects on the tilt-mode growth rate was studied. It was observed that, in agreement with previous Hall-MHD studies, two-fluid effects have a stabilizing impact on the tilt mode.

Physics↗

Speeding up software with VecCore

Portable and efficient vectorization is a significant challenge in large software projects such as GeantV, ROOT, and experiments’ frameworks. Nevertheless, fully exploiting SIMD parallelism will be a required step in order to bridge the widening gap between the needs and availability of computing resouces for data analysis and processing in particle physics. Although there are SIMD libraries that wrap compiler intrinsics into a convenient interface, they do not always support all available architectures, or they only perform well in some of them. The VecCore library was created to address some of these performance and portability issues by providing a unified abstraction layer on top of existing libraries, such as Vc or UME::SIMD. In this article, we discuss VecCore’s programming model for SIMD code and some use cases in HEP software packages such as VecGeom and GeantV.

Amadio, G.↗

Kubernetes Bindings for the Flux Workload Manager

Flux is a framework for writing resource managers as well as a resource manager for HPC systems. It allows for hierarchical nesting and providing a portable interface for job scheduling across systems. The flux-k8s software provides an interface between Flux and Kubernetes so the two frameworks can use each other's functionality. The code is currently licensed under the LGPL-3.0 License, but we request to re-license the code to promote outside collaboration and community adoption.

Ahn, DongH↗

KLOKKOS: Automated test generation for performance-portable programs

SAND2024-13830O The KLOKKOS project provides a suite of test generation and validation tools to increase maintainability and portability of Kokkos programs. KLOKKOS, a portmanteau of Klee and Kokkos, is developing an automated test generation for performance-portable programs using Clang/low-level virtual machine (LLVM) and formal methods. KLOKKOS is based on several topics in computer science: the development of symbolic and concolic analysis of LLVM and C++ codes, formal semantics and type theory, C++ templates and language features, LLVM compiler infrastructure, and data parallel primitives. 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

SciDAC↗

Docker Containers for MCNP ® Development

Containers are a revolutionary technology in software development and deployment that provides a lightweight, portable environment for ensuring consistency across multiple computing environments. In anticipation of the MCNP 6.3.1 release, two Docker container images have been released on DockerHub for general use. The MCNP source code is not included in the images, and users are still required to obtain it through RSICC. The images produced by Docker are compliant with the OCI (Open Container Initiative) standards, ensuring compatibility with other container engines such as Podman or Kubernetes’ CRI-O. Initially, the images are stored under the author’s personal space on DockerHub (docker.io/azukaitis), but they will be relocated to a dedicated MCNP group space once approved. In the future, they will also be available through the registry feature of the https://github.com/lanl/mcnp-containers project. The use of Docker provides a pre-configured environment for building and running MCNP, ensuring reproducibility of results across various host architectures. This significantly improves consistency when running MCNP on different systems. Notably, executables and installers from the Docker images have successfully passed the MCNP development branch testing suite on x86-64 architectures, including Windows, macOS, and Linux operating systems. Furthermore, testing has demonstrated compatibility with macOS Docker in emulation mode on the latest Apple Mac M2 Ultra hardware, ensuring robust support even on the latest platforms. In this document, we will provide a step-by-step guide to using the Docker images across multiple platforms. Additionally, we will present performance numbers for building and running the MCNP test suite.

97 MATHEMATICS AND COMPUTING↗

RELAP-7 Application and Enhancement for FLEX Strategies and ATF Behavior under Extended Loss of AC Power Conditions

This report summarizes the results of a three-year research project sponsored by the U.S. Department of Energy (DOE) Nuclear Energy University Program (NEUP) to enhance and apply the RELAP-7 code by adding and improving several important components (e.g., a mechanistic Reactor Core Isolation Cooling (RCIC) system model) for thermal hydraulic studies of LWRs under ELAP conditions and evaluating the time available for transition to portable FLEX equipment. The project team included University of Massachusetts–Lowell, The Ohio State University, Texas A&M University, Idaho National Laboratory and Oak Ridge National Laboratory. In the Fukushima accident, it was found that the RCIC system played a crucial role in delaying core meltdown by almost three days in Fukushima Daiichi Unit 2, because of self-regulated operation of the steam driven RCIC turbine-pump injection system. Steam flow in the convergent-divergent nozzles of the RCIC Terry turbine is two-phase non-equilibrium transonic flow with homogenous nucleation condensation. To more accurately predict the dynamic process and behavior of the transonic compressible steam flow, a one-dimensional transient two-phase analytical model is presented. A simplified four-fluid model was employed in the present work with the consideration of four separate fluid fields: vapor, liquid film, entrained droplets and condensed droplets. The mass, momentum and energy interactions between the fluids were considered and modeled. An extended seven-equation non-equilibrium critical flow model was developed to obtain the critical pressure and velocities of each phase at the nozzle throat. To predict the wetness in the divergent section, a mechanistic nucleation condensation model was integrated in the nozzle analysis model, considering the generation and consequent growth of droplets. The governing differential equations on a staggered grid were discretized using the second-order Lax-Wendroff scheme with a flux limiter, and the Semi-Implicit Method for Pressure-Linked Equation (SIMPLE) algorithm was employed to solve the discrete linear system. To demonstrate the predictability and reliability of the physical models and the numerical method proposed in the present work, three representative nozzles were modeled and simulated. The results show good agreement with the available experimental data, even for condensation shock. Then, the 1D nozzle model was employed to obtain nozzle flow tables of the Terry turbine nozzle for different working pressures which can cover the operation pressure range of the RCIC system. A mechanistic RCIC turbine-pump system model was developed and implemented in the system code TRACE to simulate dynamic responses of the RCIC system under Beyond Design Basis Accident (BDBA) conditions. The turbine-pump governing equations are based on the control volume approach of the angular momentum balance. The physics based mechanistic RCIC model was developed using the TRACE control system components (i.e., signal variables, control blocks, and tables), and incorporated into a TRACE boiling water reactor (BWR) model. The TRACE model in this report has a detailed nodalization of the reactor pressure vessel (RPV), and all of the major flow paths and system components, including the safety relief valves (SRVs) and the containment suppression pool and drywell. Based on the nozzle flow tables generated from the 1D nozzle model developed, the turbine drive torque can be calculated from table lookup. Since the detailed specifications of the RCIC pump are unavailable, the homologous curves for a Bingham pump were used in the current pump component. A station black-out (SBO) accident test problem was selected to demonstrate the TRACE RCIC model. The short-term SBO simulations were performed for two cladding materials: Zircaloy and FeCrAl, to demonstrate the effect of the accident tolerant fuel cladding on fuel heat-up under BDBA accident conditions. The wetwell plays a vital safety role in SBO and other BWR accident scenarios in that it can reduce containment pressure and supply additional core make-up water. The suppression pool temperature distribution has a very large impact on both RPV and containment pressure. Thus, another novel contribution of the project comes mainly from an improved, systems-level wetwell model which can capture buoyancy-induced thermal stratification effects due to steam injection and condensation. A two-zone stratified wetwell model has been implemented in RELAP-7 and some results from that model are presented. This wetwell model is capable of simulating thermal stratification due to a low steam mass injection rate. With a low mass flow rate, the model assumes that all the steam condenses within the pipe and the resulting plume can be approximated with a purely buoyant, heat-source driven model. The wetwell model developed with these assumptions is adequate to simulate slow transients such as extended SBO transients.

42 ENGINEERING↗

STEPS: A Portable Numerical Simulation Toolkit for Electrical Power System Dynamic Studies

Numerical simulation is the key technique for large scale power system analysis. Redistribution of global renewable power via international interconnections requires new simulation tools to study the interconnected systems with different nominal frequencies as a whole. In this paper we introduce an open source simulation toolkit for electrical power systems (STEPS) which is hosted at Github. Its kernel is coded in C++ with major functions of power flow and electro-mechanical dynamic simulation. Flexible options are provided and configurable to improve power flow solution and dynamic simulation. Common devices and models are supported in STEPS for AC/DC hybrid system studies. Studies of interconnected systems with different nominal frequencies is supported in STEPS for research of international interconnection. Application program interfaces are provided and wrapped with Python to enable high-level interfaces for general applications. STEPS is thread safe and parallel computation is supported in both kernel and script levels to accelerate simulation. It is portable and works on Windows and GNU/Linux platforms. Cases from small to large scale systems are thoroughly tested to validate the toolkit with commercial packages as benchmarks.

42 ENGINEERING↗

Fragme∩t: An Open‐Source Framework for Multiscale Quantum Chemistry Based on Fragmentation

Fragment-based quantum chemistry offers a means to circumvent the nonlinear computational scaling of conventional electronic structure calculations, by partitioning a large calculation into smaller subsystems then considering the many-body interactions between them. Variants of this approach have been used to parameterize classical force fields and machine learning potentials, applications that benefit from interoperability between quantum chemistry codes. However, there is a dearth of software that provides interoperability yet is purpose-built to handle the combinatorial complexity of fragment-based calculations. To fill this void we introduce “Fragme∩t”, an open-source software application that provides a tool for community validation of fragment-based methods, a platform for developing new approximations, and a framework for analyzing many-body interactions. Fragme∩t includes algorithms for automatic fragment generation and structure modification, and for distance- and energy-based screening of the requisite subsystems. Checkpointing, database management, and parallelization are handled internally and results are archived in a portable database. Interfaces to various quantum chemistry engines are easy to write and exist already for Q-Chem, PySCF, xTB, Orca, CP2K, MRCC, Psi4, NWChem, GAMESS, and MOPAC. Applications reported here demonstrate parallel efficiencies around 96% on more than 1000 processors but also showcase that the code can handle large-scale protein fragmentation using only workstation hardware, all with a codebase that is designed to be usable by non-experts. Fragme∩t conforms to modern software engineering best practices and is built upon well established technologies including Python, SQLite, and Ray. The source code is available under the Apache 2.0 license.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

MATAR: A performance portability and productivity implementation of data-oriented design with Kokkos

There is a need for simple, fast, and memory-efficient multidimensional data structures for dense and sparse storage that arise with numerical methods and in software applications. The data structures must perform equally well across multiple computer architectures, including CPUs and GPUs. For this purpose, we developed MATAR, a C++ software library that allows for simple creation and use of intricate data structures that is also portable across disparate architectures using Kokkos. Here, the performance aspect is achieved by forcing contiguous memory layout (or as close to contiguous as possible) for multidimensional and multi-size dense or sparse MATrix and ARray (hence, MATAR) types. Our results show that MATAR has the capability to improve memory utilization, performance, and programmer productivity in scientific computing. This is achieved by fitting more work into the available memory, minimizing memory loads required, and by loading memory in the most efficient order. This document describes the purpose of the work, the implementation of each of the data types, and the resulting performance both in some simple baseline test cases and in an application code.

97 MATHEMATICS AND COMPUTING↗

IRIS Reimagined: Advancements in Intelligent Runtime System for Task-Based Programming

Task-based programming models are gaining traction in scientific computing. IRIS is a portable runtime system that exploits multiple heterogeneous programming systems and can discover available resources and manage multiple diverse programming systems (e.g., CUDA, Hexagon, HIP, Level Zero, OpenCL, and OpenMP) simultaneously. It accounts for the constraints of task dependencies and provides customizable scheduling policies to map those tasks to heterogeneous devices. In this paper, we present new capabilities added to IRIS to improve its portability for heterogeneous programming, build-friendliness, and performance efficiency. The new additions include vendor-specific kernel support, a runtime system with a foreign function interface to eliminate writing wrapper or boilerplate code for heterogeneous kernels, an easy-to-use and configurable CMake-based build environment, automatic and efficient data transfers and orchestration, and the Hunter and DAGGER toolchains to evaluate IRIS’s task scheduling algorithms.

Miniskar, Narasinga Rao↗

Scalable Reactive Molecular Dynamics Simulations for Computational Synthesis

Reactive molecular dynamics (MD) simulation is a powerful research tool for describing chemical reactions. We eliminate the speed-limiting charge iteration in MD with a novel extended-Lagrangian scheme. The extended-Lagrangian reactive MD (XRMD) code drastically improves energy conservation while substantially reducing time-to-solution. Furthermore, we introduce a new polarizable charge equilibration (PQEq) model to accurately predict atomic charges and polarization. The XRMD code based on hybrid message passing+multithreading achieves a weak-scaling parallel efficiency of 0.977 on 786 432 IBM Blue Gene/Q cores for a 67.6 billion-atom system. The performance is portable to the second-generation Intel Xeon Phi, Knights Landing. Blue Gene/Q simulations for the computational synthesis of materials via novel exfoliation mechanisms for synthesizing atomically thin transition metal dichalcogenide layers will dominate nanomaterials science in this century.

Simulation, Modeling, Performance, and Visualizati↗

Integration of Kokkos into MonteRay [Slides]

Monte Carlo Neutron Transport codes are C++-based and simulate interaction of nuclear particles with materials. MonteRay is a library for accelerating Monte Carlo ray-casting tallies with GPUs. Kokkos is commonly used to write performance portable applications for HPC platforms. A goal is to implement Kokkos into the Expected Path Length file that uses Cuda as a backend. The methodology and results are summarized.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

SPARC: Demonstrate burst-buffer-based checkpoint/restart on ATS-1.

Recent high-performance computing (HPC) platforms such as the Trinity Advanced Technology System (ATS-1) feature burst buffer resources that can have a dramatic impact on an application’s I/O performance. While these non-volatile memory (NVM) resources provide a new tier in the storage hierarchy, developers must find the right way to incorporate the technology into their applications in order to reap the benefits. Similar to other laboratories, Sandia is actively investigating ways in which these resources can be incorporated into our existing libraries and workflows without burdening our application developers with excessive, platform-specific details. This FY18Q1 milestone summaries our progress in adapting the Sandia Parallel Aerodynamics and Reentry Code (SPARC) in Sandia’s ATDM program to leverage Trinity’s burst buffers for checkpoint/restart operations. We investigated four different approaches with varying tradeoffs in this work: (1) simply updating job script to use stage-in/stage out burst buffer directives, (2) modifying SPARC to use LANL’s hierarchical I/O (HIO) library to store/retrieve checkpoints, (3) updating Sandia’s IOSS library to incorporate the burst buffer in all meshing I/O operations, and (4) modifying SPARC to use our Kelpie distributed memory library to store/retrieve checkpoints. Team members were successful in generating initial implementation for all four approaches, but were unable to obtain performance numbers in time for this report (reasons: initial problem sizes were not large enough to stress I/O, and SPARC refactor will require changes to our code). When we presented our work to the SPARC team, they expressed the most interest in the second and third approaches. The HIO work was favored because it is lightweight, unobtrusive, and should be portable to ATS-2. The IOSS work is seen as a long-term solution, and is favored because all I/O work (including checkpoints) can be deferred to a single library.

97 MATHEMATICS AND COMPUTING↗

Query relaxation for portable brick-based applications

Semantic metadata standards pave the way for interoperability by providing building operators and application developers with common schemes to describe building resources. Applications can query building metadata models to retrieve the set of entities and relationships they need to operate, instead of hard-coding references to specific points and objects from the underlying data sources. Currently, querying such models requires the developer to be very specific when formulating queries in order to obtain meaningful answers (or any answer). The developer is inevitably expected to be familiar with the systems and components of the buildings being queried, as well as the schema used to represent them. The variety of buildings - both in the composition of their subsystems and in how they happen to be modeled - means that the developer will need to use multiple queries in order to retrieve necessary results. This is complex, time-consuming and error-prone. To address this limitation, we investigate query relaxation as a technique to facilitate discovery of meaningful building resources in a collection of ontology-based buildings data. We evaluate our query relaxation approach over a set of Brick models and demonstrate its use in the context of real-world building applications.

Brick↗

Exploring the use of novel programming models in land surface models

A wide range of programming models are currently under rapid development to meet the needs of application developers looking to work on more complex machines. These models fill a variety of roles. Some look to abstract supercomputer architecture, including both processors and memory, to present a strategy for portable performance across a wide range of machines. Others look to expose concurrency by explicitly constructing task-driven dependency graphs that allow a scheduler to find parallelism. Here we explore the implications for application codes of adopting two such programming models, Kokkos and Legion, one from each class of models. We specifically focus on the software design implications on refactoring existing applications, rather than the performance and performance tuning of these models. We identify a strategy for refactoring the Energy Exascale Earth System Model's Land Surface Model, an extremely complex code for climate applications, and prototype a series of mini-apps that explore the adoption of Kokkos and Legion. In doing this, we identify commonalities across the models, leading to a series of conclusions about application software design and refactoring for the adoption of novel programming models.

Coon, Ethan↗

ChatBLAS: The First AI-Generated and Portable BLAS Library

We present ChatBLAS, the first AI-generated and portable Basic Linear Algebra Subprograms (BLAS) library on different CPU/GPU configurations. The purpose of this study is (i) to evaluate the capabilities of current large language models (LLMs) to generate a portable and HPC library for BLAS operations and (ii) to define the fundamental practices and criteria to interact with LLMs for HPC targets to elevate the trustworthiness and performance levels of the AI-generated HPC codes. The generated C/C++ codes must be highly optimized using device-specific solutions to reach high levels of performance. Additionally, these codes are very algorithm-dependent, thereby adding an extra dimension of complexity to this study. We used OpenAI’s LLM ChatGPT and focused on vector-vector BLAS level-1 operations. ChatBLAS can generate functional and correct codes, achieving high-trustworthiness levels, and can compete or even provide better performance against vendor libraries.

Valero Lara, Pedro↗

ATDM LANL FleCSI: Topology and Execution Framework

FleCSI is a compile-time configurable C++ framework designed to support multi-physics application development. As such, FleCSI attempts to provide a very general set of infrastructure design patterns that can be specialized and extended to suit the needs of a broad variety of solver and data requirements. This means that FleCSI is potentially useful to many different ECP projects. Current support includes multidimensional mesh topology, mesh geometry, and mesh adjacency information, n-dimensional hashed-tree data structures, graph partitioning interfaces, and dependency closures (to identify data dependencies between distributed-memory address spaces). FleCSI introduces a functional programming model with control, execution, and data abstractions that are consistent with state-of-the-art task-based runtimes such as Legion and Charm++. The model also provides support for fine-grained, data-parallel execution with backend support for runtimes such as OpenMP and C++17. The FleCSI abstraction layer provides the developer with insulation from the underlying runtimes, while allowing support for multiple runtime systems, including conventional models like asynchronous MPI. The intent is to give developers a concrete set of user-friendly programming tools that can be used now, while allowing flexibility in choosing runtime implementations and optimizations that can be applied to architectures and runtimes that arise in the future. This project is essential to the ECP Ristra Next-Generation Code project, part of ASC ATDM, because it provides a hierarchically parallel programming model that is consistent with the design of modern system architectures, but which allows for the straightforward expression of algorithmic parallelism in a portably performant manner.

97 MATHEMATICS AND COMPUTING↗