The Applicability of Unit Systems to High-Performance Computing Applications

Tristan Vanderbruggen | 21-FS-016

Project Overview

Dimensional analysis is a key technique used to verify the soundness of scientific models. Most experts agree that engineering and scientific software would be made more reliable by integrating dimensional analysis in their type system. We explored how High Performance Computing (HPC) applications could integrate compile-time dimensional analysis. We started by investigating various implementation of unit systems for C++. Eventually, selecting the latest (and most advanced) one to apply to our test codes. We worked with code of increasing complexity, from a projectile trajectory calculation to the proxy-application Lulesh. This included our code, Springs-3D, which focuses on demonstrating language features while performing simple physics computations. Finally, our main contribution is a source-code analysis which extracts constraints on the dimension of all variables, functions, and constants in an application. This resulting system of equations is solved using the dimensions of a few of these objects. This analysis has the potential to greatly reduce the time spent performing dimensional analysis when refactoring application to use a representation of units.

Mission Impact

This project directly contributed to the core competency of high-performance computing, simulation, and data science through the addition of new software analysis capabilities and the demonstration of a key software engineering practice. Specifically, our work should accelerate the adoption of compile-time dimensional analysis in Lawrence Livermore National Laboratory's simulation codes. This practice will lead to improved reliability and maintainability of these codes.