Data races, a major source of bugs in concurrent programs, can result in loss of manpower and time as well as data loss due to system failures. OpenMP, the de facto shared memory parallelism framework used in the HPC community, also suffers from data races. To detect race conditions in OpenMP programs and improve turnaround time and/or developer productivity, we present a data flow analysis based, fast, static data race checker in the LLVM compiler framework. Our tool can detect races in the presence or absence of explicit barriers, with implicit or explicit synchronization. In addition, our tool effectively works for the OpenMP target offloading constructs and also supports the frequently used OpenMP constructs. We formalize and provide a data flow analysis framework to perform Phase Interval Analysis (PIA) of OpenMP programs. Phase intervals are then used to compute the MHP (and its complement NHP) sets for the programs, which, in turn, are used to detect data races statically. We evaluate our work using multiple OpenMP race detection benchmarks and real world applications. Our experiments show that the checker is comparable to the state-of-the-art in various performance metrics with around 90% accuracy, almost perfect recall, and significantly lower runtime and memory footprint.
翻译:数据竞赛是同时程序中出现错误的一个主要来源,它可能导致因系统故障而丧失人力和时间以及数据损失。 OpenMP是HPC社区中实际共享的记忆平行框架,也存在数据竞赛。为了检测 OpenMP 程序中的种族状况,并改进周转时间和/或开发生产率,我们在LLLVM 编译器框架中提出了一个基于数据流分析、快速、静态的数据竞赛检查器。我们的工具可以在存在或缺乏明确障碍的情况下,通过隐含或明确的同步来检测竞赛。此外,我们的工具有效地为 OpenMP 目标卸载结构工作,并且也支持经常使用的 OpenMP 结构。我们正式确定并提供数据流分析框架,以实施 OpenMP 程序中的阶段间分析(PIA) 。然后用阶段间隔来计算程序 MHP (及其补充 NHP) 的数据集,而后者又被用来检测静止的数据竞赛。我们用多个 OpenMP 种族探测基准和真实世界应用程序来评估我们的工作。我们的实验显示,检查器可以与在90 度的精确度上运行的状态和精确度相当。