Sara Royuela, R. Ferrer, Diego Caballero, X. Martorell
{"title":"Compiler analysis for OpenMP tasks correctness","authors":"Sara Royuela, R. Ferrer, Diego Caballero, X. Martorell","doi":"10.1145/2742854.2742882","DOIUrl":null,"url":null,"abstract":"OpenMP has become the most frequently used programming model for shared memory parallel systems by virtue of its simplicity and scalability. Notwithstanding its easiness, the constant evolution of OpenMP brings forth difficulties when it comes to keep up with its capabilities. Compilers are key tools to anticipate bugs that may appear at runtime. Despite this, most compilers do not diagnose common mistakes that cause execution errors. Furthermore, many compilers do not yet implement the latest extensions of the OpenMP asynchronous model, and there are no checking systems to properly identify errors in that model. In this paper, we focus on the mistakes derived from the usage of OpenMP tasks. We define a data-flow algorithm that computes the live tasks at every point of the program. Based on that, we present different scenarios and the analyses that allow detecting possible runtime failures, loss of performance or non-deterministic results. We have implemented all the analyses in the Mercurium source-to-source compiler, which, based on the results, suggests changes to the user in order to avoid runtime problems. We test our implementation with over 70 students and 6 benchmarks, as well as with the results of the Oracle Solaris Studio 12.3 compiler, which warns about correctness issues related to the scope of variables in OpenMP.","PeriodicalId":417279,"journal":{"name":"Proceedings of the 12th ACM International Conference on Computing Frontiers","volume":"47 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-05-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"20","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 12th ACM International Conference on Computing Frontiers","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2742854.2742882","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 20
Abstract
OpenMP has become the most frequently used programming model for shared memory parallel systems by virtue of its simplicity and scalability. Notwithstanding its easiness, the constant evolution of OpenMP brings forth difficulties when it comes to keep up with its capabilities. Compilers are key tools to anticipate bugs that may appear at runtime. Despite this, most compilers do not diagnose common mistakes that cause execution errors. Furthermore, many compilers do not yet implement the latest extensions of the OpenMP asynchronous model, and there are no checking systems to properly identify errors in that model. In this paper, we focus on the mistakes derived from the usage of OpenMP tasks. We define a data-flow algorithm that computes the live tasks at every point of the program. Based on that, we present different scenarios and the analyses that allow detecting possible runtime failures, loss of performance or non-deterministic results. We have implemented all the analyses in the Mercurium source-to-source compiler, which, based on the results, suggests changes to the user in order to avoid runtime problems. We test our implementation with over 70 students and 6 benchmarks, as well as with the results of the Oracle Solaris Studio 12.3 compiler, which warns about correctness issues related to the scope of variables in OpenMP.
由于其简单性和可伸缩性,OpenMP已成为共享内存并行系统最常用的编程模型。尽管它很容易,但OpenMP的不断发展在跟上其功能方面带来了困难。编译器是预测在运行时可能出现的错误的关键工具。尽管如此,大多数编译器不诊断导致执行错误的常见错误。此外,许多编译器还没有实现OpenMP异步模型的最新扩展,并且没有检查系统来正确识别该模型中的错误。在本文中,我们主要关注OpenMP任务的使用所导致的错误。我们定义了一个数据流算法,用于在程序的每个点计算实时任务。在此基础上,我们提出了不同的场景和分析,这些场景和分析允许检测可能的运行时故障、性能损失或不确定结果。我们已经在Mercurium源到源编译器中实现了所有的分析,该编译器根据分析结果向用户建议更改,以避免运行时问题。我们用70多名学生和6个基准测试来测试我们的实现,以及Oracle Solaris Studio 12.3编译器的结果,该编译器警告与OpenMP中变量范围相关的正确性问题。