{"title":"OpenMP程序中渐进式静态竞态检测","authors":"Bradley Swain, Jeff Huang","doi":"10.1109/Correctness.2018.00009","DOIUrl":null,"url":null,"abstract":"OpenMP is a high level API that allows programmers to write concurrent programs on multi-core systems. OpenMP provides an interface for easily managing teams of threads and concurrent tasks allowing the programmer to focus on modeling a problem concurrently rather than dealing with low level thread management details for each system on which the code may run. Although OpenMP can automatically handle many parts of writing parallel programs (thread management, work distribution, scheduling, etc.), OpenMP offers no protection against data races. The programmer is left with the difficult task of ensuring that OpenMP programs are free of data races. Many concurrent programs, especially those related to high performance computing, can be difficult for programmers to reason through and are particularly prone to data races due to programmer error. This paper presents an extensible and incremental static analysis technique for detecting data races in OpenMP programs at compile time. Our technique is comprised of two primary components: (i): Array Index Analysis, which is used to detect when two array accesses made from separate threads may overlap resulting in multiple accesses to the same location in memory. (ii): An Incremental Phase Graph is used to build a May Happen in Parallel (MHP) model that is utilized in determining if overlapping array accesses are capable of occurring concurrently.","PeriodicalId":217525,"journal":{"name":"2018 IEEE/ACM 2nd International Workshop on Software Correctness for HPC Applications (Correctness)","volume":"46 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"Towards Incremental Static Race Detection in OpenMP Programs\",\"authors\":\"Bradley Swain, Jeff Huang\",\"doi\":\"10.1109/Correctness.2018.00009\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"OpenMP is a high level API that allows programmers to write concurrent programs on multi-core systems. OpenMP provides an interface for easily managing teams of threads and concurrent tasks allowing the programmer to focus on modeling a problem concurrently rather than dealing with low level thread management details for each system on which the code may run. Although OpenMP can automatically handle many parts of writing parallel programs (thread management, work distribution, scheduling, etc.), OpenMP offers no protection against data races. The programmer is left with the difficult task of ensuring that OpenMP programs are free of data races. Many concurrent programs, especially those related to high performance computing, can be difficult for programmers to reason through and are particularly prone to data races due to programmer error. This paper presents an extensible and incremental static analysis technique for detecting data races in OpenMP programs at compile time. Our technique is comprised of two primary components: (i): Array Index Analysis, which is used to detect when two array accesses made from separate threads may overlap resulting in multiple accesses to the same location in memory. (ii): An Incremental Phase Graph is used to build a May Happen in Parallel (MHP) model that is utilized in determining if overlapping array accesses are capable of occurring concurrently.\",\"PeriodicalId\":217525,\"journal\":{\"name\":\"2018 IEEE/ACM 2nd International Workshop on Software Correctness for HPC Applications (Correctness)\",\"volume\":\"46 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-11-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2018 IEEE/ACM 2nd International Workshop on Software Correctness for HPC Applications (Correctness)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/Correctness.2018.00009\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2018 IEEE/ACM 2nd International Workshop on Software Correctness for HPC Applications (Correctness)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/Correctness.2018.00009","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
摘要
OpenMP是一个高级API,它允许程序员在多核系统上编写并发程序。OpenMP提供了一个接口,可以轻松地管理线程团队和并发任务,使程序员可以专注于并发地建模问题,而不是为每个可能运行代码的系统处理低级线程管理细节。虽然OpenMP可以自动处理编写并行程序的许多部分(线程管理、工作分配、调度等),但OpenMP不提供防止数据竞争的保护。程序员面临着确保OpenMP程序不存在数据竞争的艰巨任务。许多并发程序,特别是那些与高性能计算相关的程序,对于程序员来说可能很难理解,并且由于程序员的错误,特别容易出现数据竞争。本文提出了一种可扩展的增量静态分析技术,用于在编译时检测OpenMP程序中的数据争用。我们的技术由两个主要组件组成:(i):数组索引分析(Array Index Analysis),用于检测来自不同线程的两个数组访问何时可能重叠,从而导致对内存中同一位置的多次访问。(ii):增量相位图用于构建可能并行发生(MHP)模型,该模型用于确定重叠数组访问是否能够并发发生。
Towards Incremental Static Race Detection in OpenMP Programs
OpenMP is a high level API that allows programmers to write concurrent programs on multi-core systems. OpenMP provides an interface for easily managing teams of threads and concurrent tasks allowing the programmer to focus on modeling a problem concurrently rather than dealing with low level thread management details for each system on which the code may run. Although OpenMP can automatically handle many parts of writing parallel programs (thread management, work distribution, scheduling, etc.), OpenMP offers no protection against data races. The programmer is left with the difficult task of ensuring that OpenMP programs are free of data races. Many concurrent programs, especially those related to high performance computing, can be difficult for programmers to reason through and are particularly prone to data races due to programmer error. This paper presents an extensible and incremental static analysis technique for detecting data races in OpenMP programs at compile time. Our technique is comprised of two primary components: (i): Array Index Analysis, which is used to detect when two array accesses made from separate threads may overlap resulting in multiple accesses to the same location in memory. (ii): An Incremental Phase Graph is used to build a May Happen in Parallel (MHP) model that is utilized in determining if overlapping array accesses are capable of occurring concurrently.