Compiler Automatic Discovery of OmpSs Task Dependencies

Dependence analysis is an essential step for many compiler optimizations, from simple loop transformations to automatic parallelization. Parallel programming models require specific dependence analyses that take into account multi-threaded execution. Furthermore, asynchronous parallelism introduced by OpenMP tasks has promoted the development of new dependency analysis techniques. In these terms, OmpSs parallel programming model extends OpenMP tasks with the definition of intertask dependencies. This extension allows run-time dependency detection, which potentially improves the performance when load balancing or locality rule the execution time. On the other side, the extension requires the user to figure out data-sharing attributes and the type of access to each data in all tasks in order to correctly specify the dependencies. We aim to enhance the programmability of OmpSs with a new methodology that enables the compiler to automatically determine the dependencies of OmpSs tasks, thus releasing users from the task of manually defining these dependencies. In this context, we have developed an algorithm based on the discovery of code concurrent to a task and liveness analysis. The algorithm first finds out all code concurrent with a given task. Then, it computes the data-sharing attributes of the variables appearing in the task. Finally, it analyzes the liveness properties of the task’s shared variables. With this information, the algorithm figures out the proper dependencies of the task. We have implemented this algorithm in the Mercurium source-to-source compiler. We have tested the results with several benchmarks proving that the algorithm is able to correctly find a large number of dependency expressions.

[1]  William Baxter,et al.  The program dependence graph and vectorization , 1989, POPL '89.

[2]  Barbara Chapman,et al.  Shared Memory Parallel Programming with Open MP , 2005 .

[3]  Uday Bondhugula,et al.  A practical automatic polyhedral parallelizer and locality optimizer , 2008, PLDI '08.

[4]  V. Sarkar,et al.  Automatic partitioning of a program dependence graph into parallel tasks , 1991, IBM J. Res. Dev..

[5]  Henk Sips,et al.  Euro-Par 2009 Parallel Processing, 15th International Euro-Par Conference, Delft, The Netherlands, August 25-28, 2009. Proceedings , 2009, Euro-Par.

[6]  Klaus Schneider,et al.  Multithreaded code from synchronous programs: Extracting independent threads for OpenMP , 2010, 2010 Design, Automation & Test in Europe Conference & Exhibition (DATE 2010).

[7]  William Gropp,et al.  OpenMP in the Petascale Era - 7th International Workshop on OpenMP, IWOMP 2011, Chicago, IL, USA, June 13-15, 2011. Proceedings , 2011, IWOMP.

[8]  Alejandro Duran,et al.  Ompss: a Proposal for Programming Heterogeneous Multi-Core Architectures , 2011, Parallel Process. Lett..

[9]  Christian Terboven,et al.  Automatic Scoping of Variables in Parallel Regions of an OpenMP Program , 2004, WOMPAT.

[10]  Per Larsen,et al.  Identifying Inter-task Communication in Shared Memory Programming Models , 2009, IWOMP.

[11]  Alejandro Duran,et al.  Barcelona OpenMP Tasks Suite: A Set of Benchmarks Targeting the Exploitation of Task Parallelism in OpenMP , 2009, 2009 International Conference on Parallel Processing.

[12]  Eduard Ayguadé,et al.  Hierarchical Task-Based Programming With StarSs , 2009, Int. J. High Perform. Comput. Appl..

[13]  Dieter an Mey,et al.  Parallelising Computational Microstructure Simulations for Metallic Materials with OpenMP , 2011, IWOMP.

[14]  Alejandro Duran,et al.  A Proposal to Extend the OpenMP Tasking Model with Dependent Tasks , 2009, International Journal of Parallel Programming.

[15]  Monica S. Lam,et al.  Jade: a high-level, machine-independent language for parallel programming , 1993, Computer.

[16]  Alejandro Duran,et al.  Auto-scoping for OpenMP Tasks , 2012, IWOMP.

[17]  Sergei Gorlatch,et al.  Using OpenMP vs. Threading Building Blocks for Medical Imaging on Multi-cores , 2009, Euro-Par.

[18]  Sara Royuela Alcázar Compiler Analysis and its application to OmpSs , 2012 .

[19]  Bronis R. de Supinski,et al.  Evolving OpenMP in an Age of Extreme Parallelism, 5th International Workshop on OpenMP, IWOMP 2009, Dresden, Germany, June 3-5, 2009, Proceedings , 2009, IWOMP.

[20]  James Reinders,et al.  Intel® threading building blocks , 2008 .

[21]  Matthias S. Müller,et al.  OpenMP in a Heterogeneous World , 2012, Lecture Notes in Computer Science.

[22]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[23]  Andy Podgurski,et al.  The Probabilistic Program Dependence Graph and Its Application to Fault Diagnosis , 2010, IEEE Trans. Software Eng..

[24]  Ben H. H. Juurlink,et al.  Programming parallel embedded and consumer applications in OpenMP superscalar , 2012, PPoPP '12.

[25]  Lori L. Pollock,et al.  Register allocation over the program dependence graph , 1994, PLDI '94.