Abstract
In this work we propose a novel technique to reduce the overheads related to nested parallel loops in OpenMP programs. In particular we show that in many cases it is possible to replace the code of a nested parallel-for loop with equivalent code that creates tasks instead of threads, thereby limiting parallelism levels while allowing more opportunities for runtime load balancing. In addition we present the details of an implementation of this technique that is able to perform the whole procedure completely transparently. We have experimented extensively to determine the effectiveness of our methods. The results show the actual performance gains we obtain (up to 25% in a particular application) as compared to other OpenMP implementations that are forced to suffer nested parallelism overheads.
This work has been supported in part by the General Secretariat for Research and Technology and the European Commission (ERDF) through the Artemisia SMECY project (grant 100230).
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
Agathos, S.N., Hadjidoukas, P.E., Dimakopoulos, V.V.: Design and Implementation of OpenMP Tasks in the OMPi Compiler. In: Proc. of 15th Panhellenic Conference on Informatics, PCI 2011, pp. 265–269. IEEE, Kastoria (2011)
Blumofe, R.D., Joerg, C.F., Kuszmaul, B.C., Leiserson, C.E., Randall, K.H., Zhou, Y.: Cilk: An efficient multithreaded runtime system. J. Parallel Distrib. Comput. 37(1), 55–69 (1996)
Bull, J.M.: Measuring Synchronisation and Scheduling Overheads in OpenMP. In: Proc. of 1st European Workshop on OpenMP, EWOMP, pp. 99–105. Lund, Sweden (September 1999)
Dimakopoulos, V.V., Leontiadis, E., Tzoumas, G.: A portable C compiler for OpenMP V.2.0. In: Proc. of 5th European Workshop on OpenMP, EWOMP 2003, Aachen, Germany, pp. 5–11 (September 2003)
Hadjidoukas, P.E., Dimakopoulos, V.V., Delakis, M., Garcia, C.: A high-performance face detection system using OpenMP. Concurrency and Computation: Practice and Experience 21, 1819–1837 (2009)
Hadjidoukas, P.E., Dimakopoulos, V.V.: Nested Parallelism in the OMPi OpenMP/C Compiler. In: Kermarrec, A.-M., Bougé, L., Priol, T. (eds.) Euro-Par 2007. LNCS, vol. 4641, pp. 662–671. Springer, Heidelberg (2007)
Leiserson, C.E.: The Cilk++ concurrency platform. J. of Supercomputing 51, 244–257 (2012)
OpenMP ARB: OpenMP Application Program Interface V3.0 (May 2008)
OpenMP ARB: OpenMP Application Program Interface V3.1 (July 2011)
Reinders, J.: Intel threading building blocks, 1st edn. O’Reilly & Associates, Inc., Sebastopol (2007)
Rowley, H., Baluja, S., Kanade, T.: Neural network-based face detection. IEEE Trans. on Pattern Analysis and Machine Intelligence 20, 23–28 (1998)
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
Agathos, S.N., Hadjidoukas, P.E., Dimakopoulos, V.V. (2012). Task-Based Execution of Nested OpenMP Loops. 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_16
Download citation
DOI: https://doi.org/10.1007/978-3-642-30961-8_16
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)