Skip to main content
eScholarship
Open Access Publications from the University of California

UC Davis

UC Davis Electronic Theses and Dissertations bannerUC Davis

Using Program Analysis and Testing to Facilitate Debugging and Optimization of Scientific Applications

Abstract

Scientific applications rely heavily on floating-point computations to model complex phenomena in physics, chemistry, biology, and other scientific domains. However, floating-point arithmetic is inherently imprecise and can lead to numerical inconsistencies that affect the correctness and reliability of scientific software. Additionally, optimizing these applications to efficiently utilize modern high-performance computing resources is a significant challenge.This dissertation addresses these challenges through four complementary approaches using program analysis and testing techniques to facilitate debugging and optimization of scientific applications. First, we present Ciel, a tool that uses bisection search and precision enhancement for enhanced isolation of compiler-induced numerical inconsistencies in heterogeneous code, helping developers identify the expressions that cause unexpected numerical behavior. Evaluation demonstrated 99.4% precision across 330 GPU programs and real-world mini-apps. Second, we introduce CIGEN, a tool utilizing a multi-phased approach, combining sampling, input clustering, and function optimization techniques to find input ranges with compiler-induced numerical inconsistencies. On 175 GNU Scientific Library functions, CIGEN found 53.4% more functions with high inconsistencies than prior work. Third, we present FloatGuard, a dynamic testing approach for detecting floating-point exceptions in AMD GPUs. FloatGuard successfully detected floating-point exceptions in 89.7% of evaluated programs (507 out of 565). Finally, we develop Muppet, a framework to optimize the performance of OpenMP applications via source-based code transformation and mutation testing. Muppet achieved performance improvements in 75.9% of evaluated programs with a maximum speedup of 3.57x.Together, these contributions provide developers and researchers with practical tools to improve the reliability and performance of scientific applications. Our evaluation on real-world scientific codes demonstrates the effectiveness of these approaches in detecting, localizing, and mitigating numerical issues while maintaining computational efficiency.