LLOR: Automated Repair of OpenMP Programs

Utpal Bora,Saurabh Joshi,Gautam Muduganti,Ramakrishna Upadrasta
2024-11-22
Abstract:In this paper, we present a technique for repairing data race errors in parallel programs written in C/C++ and Fortran using the OpenMP API. Our technique can also remove barriers that are deemed unnecessary for correctness. We implement these ideas in our tool called LLOR, which takes a language-independent approach to provide appropriate placements of synchronization constructs to avoid data races. To the best of our knowledge, LLOR is the only tool that can repair parallel programs that use the OpenMP API. We showcase the capabilities of LLOR by performing extensive experiments on 415 parallel programs.
Distributed, Parallel, and Cluster Computing,Software Engineering
What problem does this paper attempt to address?
This paper attempts to solve the data race problem in parallel programs written with the OpenMP API. Specifically, the paper introduces a tool named LLOR, which adopts an automated method to fix data race errors in parallel programs written in C/C++ and Fortran languages, and can remove barriers considered unnecessary. The following are the main contributions of the paper: 1. **Automatically Fix Data Races**: - The LLOR tool can automatically identify and fix data race errors in parallel programs written with the OpenMP API. 2. **Barrier Placement Technique**: - For OpenMP programs containing parallel regions, a technique for inserting barriers at appropriate positions to avoid data races is proposed. 3. **Ordered Region Identification**: - For OpenMP programs containing parallel for - loops, a technique to identify statements that need to be placed within ordered regions to avoid data races is proposed. 4. **Removing Unnecessary Synchronization Constructs**: - A method is proposed that can remove unnecessary barriers and ordered regions inserted by programmers without affecting correctness. 5. **Solver Strategy Comparison**: - The practical differences between two different solver strategies (mhs and MaxSAT) used in the repair process are shown. 6. **Experimental Evaluation**: - Through extensive experimental evaluation of 415 parallel programs, the effectiveness of LLOR is demonstrated. These benchmarks include 235 C/C++ programs and 180 Fortran programs, highlighting the language compatibility of LLOR. Through these contributions, LLOR becomes the only tool and technology that can provide repair solutions for parallel programs written with the OpenMP API.