Is the Schedule Clause Really Necessary in OpenMP?
Choosing the appropriate assignment of loop iterations to threads is one of the most important decisions that need to be taken when parallelizing Loops, the main source of parallelism in numerical applications. This is not an easy task, even for expert programmers, and it can potentially take a large amount of time. OpenMP offers the schedule clause, with a set of predefined iteration scheduling strategies, to specify how (and when) this assignment of iterations to threads is done. In some cases, the best schedule depends on architectural characteristics of the target architecture, data input, ... making the code less portable. Even worse, the best schedule can change along execution time depending on dynamic changes in the behavior of the loop or changes in the resources available in the system. Also, for certain types of imbalanced loops, the schedulers already proposed in the literature are not able to extract the maximum parallelism because they do not appropriately trade-off load balancing and data locality. This paper proposes a new scheduling strategy, that derives at run time the best scheduling policy for each parallel loop in the program, based on information gathered at runtime by the library itself.
KeywordsLoad Balance Balance State Iteration Space Cache Line Static Schedule
Unable to display preview. Download preview PDF.
- 3.S. Lucco. A dynamic scheduling method for irregular parallel programs. In Proceedings of ACM SIGPLAN’92 Conference on Programming Language Desing and Implementation, pages 220–211, 1992.Google Scholar
- 4.Kelvin K. Yule and David J. Lilja. Categorizing parallel loops based on iteration execution time variances. Technical Report HPPC-94-13, University of Minnesota, 1994.Google Scholar
- 5.E. P. Markatos and T. J. LeBlanc. Using processor affinity in loop scheduling on shared-memory multiprocessors. Technical Report TR410, 1992.Google Scholar
- 6.S. Subramaniam and D.L. Eager. Affinity scheduling of unbalanced workloads. In SuperComputer’94 Conference Proceedings, 1994.Google Scholar
- 7.J. Mark Bull. Feedback guided dynamic loop scheduling: Algorithms and experiments. In European Conference on Parallel Processing, pages 377–382, 1998.Google Scholar
- 8.Francis H. Dang and Lawrence Rauchwerger. Speculative parallelization of partially parallel loops. In Languages, Compilers, and Run-Time Systems for Scalable Computers, pages 285–299, 2000.Google Scholar
- 9.Babak Hamidzadeh and David J. Lilja. Self-adjusting scheduling: An on-line optimization technique for locality management and load balancing. In International Conference on Parallel Processing, pages 39–46, 1994.Google Scholar
- 10.Vishal Aslot, Max Domeika, Rudolf Eigenmann, Greg Gaertner, Wesley B. Jones, and Bodo Parady. SPEComp: A new benchmark suite for measuring parallel computer performance. Lecture Notes in Computer Science, 2104, 2001.Google Scholar
- 11.D. H. Bailey, E. Barszcz, J. T. Barton, D. S. Browning, R. L. Carter, D. Dagum, R. A. Fatoohi, P. O. Frederickson, T. A. Lasinski, R. S. Schreiber, H. D. Simon, V. Venkatakrishnan, and S. K. Weeratunga. The NAS Parallel Benchmarks. The International Journal of Supercomputer Applications, 5(3):63–73, Fall 1991.CrossRefGoogle Scholar
- 12.Steve Behling et al. The POWER4 processor introduction and tuning guide. Technical Report SG24-7041-00, International Technical Support Organization, November 2001. ISBN 0738423556.Google Scholar