Abstract
Multi-core processors are at the heart of current and future trends for computer architectures. The number of cores on a single chip is rapidly increasing, so as the need for simpler and more efficient programming models. OpenMP is a powerful programming model that has been adopted by a large spectrum of research and development teams to develop parallel applications on multi-core processors. To fully exploit the available cores in multi-cores chips, the latest versions of OpenMP specification marked a transition from a thread-centric to a task-centric programming model. Hence, tasks are used to express parallelism and to execute concurrent computations. However, this programming model suffers from the lack of a useful feature where created tasks can be explicitly cancelled. Task cancellation is considered an important aspect in programs based on speculative execution and search algorithms, where computation resources should be quickly released if not needed, yielding higher computation efficiency and lower power consumption. In this paper, we present a proposal and an enhancement to the OpenMP programming model that allows users to create special type of tasks called “cancellable tasks”. New easy to use extensions are added in order to support both cooperative and forced cancellation of these special tasks through specific cancellation calls. We will show that these extensions reduce execution time and response delays of parallel applications that may need cancellation and prompt resources re-allocation compared to the user cancellation approach based on flags.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
The Cilk Project: Cilk5 Specifications (2010), http://supertech.csail.mit.edu/cilk/manual-5.4.6.pdf
Intel Threading Building Blocks for Open Source: TBB Specifications (2012), http://threadingbuildingblocks.org/documentation.php
Microsoft MSDN Library: Cancellation in the PPL (2012), http://msdn.microsoft.com/en-us/library/dd984117.aspx
OpenMP Architecture Review Board: OpenMP Specifications (2011), http://www.openmp.org/specs
Programming Models at BSC: The OmpSs Programming Model (2012), https://pm.bsc.es/content/ompss-programming-model
Perez, R., Malecha, G.: Speculative Parallelism in Cilk++ (2010), http://courses.csail.mit.edu/6.884/spring10/projects/rmperez-gmalecha_paper.pdf
Ayguadé, E., Copty, N., Duran, A., Hoeflinger, J., Lin, Y., Massaioli, F., Teruel, X., Unnikrishnan, P., Zhang, G.: The Design of OpenMP Tasks. IEEE Trans. Parallel Distrib. Syst. 20, 404–418 (2009)
Balart, J., Duran, A., Gonzàlez, M., Martorell, X., Ayguadé, E., Labarta, J.: Nanos Mercurium: a Research Compiler for OpenMP. In: European Workshop on OpenMP (EWOMP 2004), pp. 103–109 (2004)
Duran, A., Teruel, X., Ferrer, R., Martorell, X., Ayguade, E.: Barcelona OpenMP Tasks Suite: A Set of Benchmarks Targeting the Exploitation of Task Parallelism in OpenMP. In: Proceedings of the 2009 International Conference on Parallel Processing, ICPP 2009, pp. 124–131. IEEE Computer Society, Washington, DC (2009)
Prabhu, P., Ramalingam, G., Vaswani, K.: Safe Programmable Speculative Parallelism. In: Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2010, pp. 50–61. ACM, New York (2010)
Süß, M., Leopold, C.: Implementing Irregular Parallel Algorithms with OpenMP. In: Nagel, W.E., Walter, W.V., Lehner, W. (eds.) Euro-Par 2006. LNCS, vol. 4128, pp. 635–644. Springer, Heidelberg (2006)
Süß, M., Leopold, C.: Common Mistakes in OpenMP and How to Avoid Them: A Collection of Best Practices. In: Mueller, M.S., Chapman, B.M., de Supinski, B.R., Malony, A.D., Voss, M. (eds.) IWOMP 2005 and IWOMP 2006. LNCS, vol. 4315, pp. 312–323. Springer, Heidelberg (2008)
Teruel, X., Martorell, X., Duran, A., Ferrer, R., Ayguadé, E.: Support for OpenMP Tasks in Nanos v4. In: Proceedings of the 2007 Conference of the Center for Advanced Studies on Collaborative Research, CASCON 2007, pp. 256–259. ACM, New York (2007)
Wong, M., Klemm, M., Duran, A., Mattson, T., Haab, G., de Supinski, B.R., Churbanov, A.: Towards an Error Model for OpenMP. In: Sato, M., Hanawa, T., Müller, M.S., Chapman, B.M., de Supinski, B.R. (eds.) IWOMP 2010. LNCS, vol. 6132, pp. 70–82. Springer, Heidelberg (2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Tahan, O., Brorsson, M., Shawky, M. (2012). Introducing Task Cancellation to OpenMP. In: Chapman, B.M., Massaioli, F., Müller, M.S., Rorro, M. (eds) OpenMP in a Heterogeneous World. IWOMP 2012. Lecture Notes in Computer Science, vol 7312. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30961-8_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-30961-8_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-30960-1
Online ISBN: 978-3-642-30961-8
eBook Packages: Computer ScienceComputer Science (R0)