Skip to main content

Compiler Automatic Discovery of OmpSs Task Dependencies

  • Conference paper
Languages and Compilers for Parallel Computing (LCPC 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7760))

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Duran, A., Teruel, X., Ferrer, R., Martorell, X., Ayguadé, E.: Barcelona OpenMP Tasks Suite: A Set of Benchmarks Targeting the Exploitation of Task Parallelism in OpenMP. In: 38th International Conference on Parallel Processing (ICPP 2009), Vienna, Austria, pp. 124–131. IEEE Computer Society (September 2009)

    Google Scholar 

  2. Altenfeld, R., Apel, M., an Mey, D., Böttger, B., Benke, S., Bischof, C.: Parallelising Computational Microstructure Simulations for Metallic Materials with OpenMP. In: Chapman, B.M., Gropp, W.D., Kumaran, K., Müller, M.S. (eds.) IWOMP 2011. LNCS, vol. 6665, pp. 1–11. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  3. Andersch, M., Chi, C.C., Juurlink, B.H.H.: Programming parallel embedded and consumer applications in OpenMP superscalar. In: Ramanujam, J., Sadayappan, P. (eds.) PPoPP, pp. 281–282. ACM (2012)

    Google Scholar 

  4. Baah, G.K., Podgurski, A., Harrold, M.J.: The Probabilistic Program Dependence Graph and Its Application to Fault Diagnosis.. IEEE Transactions on Software Engineering 36(4), 528–545 (2010)

    Article  Google Scholar 

  5. Barcelona Supercomputing Center. The NANOS Group Site: The Mercurium Compiler, http://nanos.ac.upc.edu/mcxx

  6. Barcelona Supercomputing Center. Barcelona Supercomputing Center – Centro Nacional de Supercomputación (2011), http://www.bsc.es/

  7. Baudisch, D., Brandt, J., Schneider, K.: Multithreaded code from synchronous programs: Extracting independent threads for OpenMP. In: DATE, pp. 949–952. IEEE (2010)

    Google Scholar 

  8. Baxter III, W., Bauer, H.R.: The Program Dependence Graph and Vectorization. In: PPL, pp. 1–11 (1989)

    Google Scholar 

  9. Bondhugula, U., Hartono, A., Ramanujam, J., Sadayappan, P.: A practical automatic polyhedral parallelizer and locality optimizer. In: Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2008, pp. 101–113. ACM, New York (2008)

    Chapter  Google Scholar 

  10. Duran, A., Ayguadé, E., Badia, R.M.: OmpSs: a Proposal for Programming Heterogeneous Multi-Core Architectures. PPL 21(2), 173–193 (2011)

    MATH  Google Scholar 

  11. Duran, A., Ferrer, R., Ayguadé, E., Badia, R.M., Labarta, J.: A Proposal to Extend the OpenMP Tasking Model with Dependent Tasks.. International Journal of Parallel Programming 37(3), 292–305 (2009)

    Article  MATH  Google Scholar 

  12. Ferrante, J., Ottenstein, K.J., Warren, J.D.: The Program Dependence Graph and its Use in Optimization. In: Paul, M., Robinet, B. (eds.) Programming 1984. LNCS, vol. 167, pp. 125–132. Springer, Heidelberg (1984)

    Google Scholar 

  13. James: Intel ® Threading Building Blocks. O’Reilly Media, Inc. (July 2007)

    Google Scholar 

  14. Kegel, P., Schellmann, M., Gorlatch, S.: Using OpenMP vs. Threading Building Blocks for Medical Imaging on Multi-cores. In: Sips, H., Epema, D., Lin, H.-X. (eds.) Euro-Par 2009. LNCS, vol. 5704, pp. 654–665. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  15. Larsen, P., Karlsson, S., Madsen, J.: Identifying Inter-task Communication in Shared Memory Programming Models. In: Müller, M.S., de Supinski, B.R., Chapman, B.M. (eds.) IWOMP 2009. LNCS, vol. 5568, pp. 168–182. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  16. Lin, Y., Terboven, C., an Mey, D., Copty, N.: Automatic Scoping of Variables in Parallel Regions of an OpenMP Program. In: Chapman, B.M. (ed.) WOMPAT 2004. LNCS, vol. 3349, pp. 83–97. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  17. Norris, C., Pollock, L.L.: Register Allocation over the Program Dependence Graph.. In: PLDI, pp. 266–277 (1994)

    Google Scholar 

  18. OpenMP ARB. OpenMP Application Program Interface, v. 3.1 (September 2011), http://www.openmp.org

  19. Planas, J., Badia, R.M., Ayguadé, E., Labarta, J.: Hierarchical Task-Based Programming With StarSs. International Journal of High Performance Computing Applications 23(3), 284–299 (2009)

    Article  Google Scholar 

  20. Rinard, M.C., Scales, D.J., Lam, M.S.: A High-Level, Machine-Independent Language for Parallel Programming. IEEE Computer 26(6), 28–38 (1993)

    Article  Google Scholar 

  21. Royuela, S.: Compiler Analysis and its Application to OmpSs. Master’s thesis, Technical University of Catalonia, 1012

    Google Scholar 

  22. Royuela, S., Duran, A., Liao, C., Quinlan, D.J.: Auto-scoping for OpenMP Tasks. In: Chapman, B.M., Massaioli, F., Müller, M.S., Rorro, M. (eds.) IWOMP 2012. LNCS, vol. 7312, pp. 29–43. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  23. Sarkar, V.: Automatic partitioning of a program dependence graph into parallel tasks. IBM Journal of Research and Development 35(5), 779–804 (1991)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Royuela, S., Duran, A., Martorell, X. (2013). Compiler Automatic Discovery of OmpSs Task Dependencies. In: Kasahara, H., Kimura, K. (eds) Languages and Compilers for Parallel Computing. LCPC 2012. Lecture Notes in Computer Science, vol 7760. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37658-0_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-37658-0_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-37657-3

  • Online ISBN: 978-3-642-37658-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics