A Proposal for Task-Generating Loops in OpenMP*
With the addition of the OpenMP* tasking model, programmers are able to improve and extend the parallelization opportunities of their codes. Programmers can also distribute the creation of tasks using a worksharing construct, which allows the generation of work to be parallelized. However, while it is possible to create tasks inside worksharing constructs, it is not possible to distribute work when not all threads reach the same worksharing construct. We propose a new worksharing-like construct that removes this restriction: the taskloop construct. With this new construct, we can distribute work when executing in the context of an explicit task, a single, or a master construct, enabling us to explore new parallelization opportunities in our applications. Although we focus our current work on evaluating expressiveness rather than performance evaluation, we present some initial performance results using a naive implementation for the new taskloop construct based on a lazy task instantiation mechanism.
KeywordsOpenMP Task Worksharing Loop Fork/Join
Unable to display preview. Download preview PDF.
- 2.Balart, J., Duran, A., Gonzàlez, M., Martorell, X., Ayguadé, E., Labarta, J.: Nanos Mercurium: a Research Compiler for OpenMP. In: Proc. of the 6th European Workshop on OpenMP (EWOMP 2004), pp. 103–109 (October 2004)Google Scholar
- 4.Ferrer, R.: Task Chunking of Iterative Constructions in OpenMP 3.0. In: Proc. of the 1st Workshop on Execution Environments for Distributed Computing, pp. 49–54 (July 2007)Google Scholar
- 6.Kurzak, J., Ltaief, H., Dongarra, J.J., Badia, R.M.: Scheduling for Numerical Linear Algebra Library at Scale. In: Proc. of the High Performance Computing Workshop, pp. 3–26 (June 2008)Google Scholar
- 8.Microsoft: Task Parallel Library (2013), http://msdn.microsoft.com/en-us/library/dd460717.aspx (last accessed June 21, 2013)
- 9.OpenMP Architecture Review Board: OpenMP Application Program Interface, Version 3.1 (July 2011)Google Scholar
- 10.OpenMP Architecture Review Board: OpenMP Application Program Interface, Version 4.0: Public Review Release Candidate 2 (March 2013)Google Scholar
- 11.Reinders, J.: Intel Threading Building Blocks. O’Reilly, Sebastopol (2007)Google Scholar