Advertisement

A Proposal for User-Defined Reductions in OpenMP

  • Alejandro Duran
  • Roger Ferrer
  • Michael Klemm
  • Bronis R. de Supinski
  • Eduard Ayguadé
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6132)

Abstract

Reductions are commonly used in parallel programs to produce a global result from partial results computed in parallel. Currently, OpenMP only supports reductions for primitive data types and a limited set of base language operators. This is a significant limitation for those applications that employ user-defined data types (e.g., objects). Implementing manual reduction algorithms makes software development more complex and error-prone. Additionally, an OpenMP runtime system cannot optimize a manual reduction algorithm in ways typically applied to reductions on primitive types. In this paper, we propose new mechanisms to allow the use of most pre-existing binary functions on user-defined data types as User-Defined Reduction (UDR) operators. Our measurements show that our UDR prototype implementation provides consistently good performance across a range of thread counts without increasing general runtime overheads.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bull, J.M.: Measuring Synchronisation and Scheduling Overheads in OpenMP. In: Proc. of 1st European Workshop on OpenMP, Lund, Sweden, October 1999, pp. 99–105 (1999)Google Scholar
  2. 2.
    Barcelona Supercomputing Center. The NANOS Group Site: The Mercurium Compiler, http://nanos.ac.upc.edu/mcxx
  3. 3.
    Intel Corporation. Intel Itanium 2 Processor Reference Manual for Software Development and Optimization (May 2004); Order number 251110-003Google Scholar
  4. 4.
    Dean, J., Ghemawat, S.: MapReduce: Simplified Data Processing on Large Clusters. Communications of ACM 51(1), 107–113 (2008)CrossRefGoogle Scholar
  5. 5.
    Deitz, S.J., Chamberlain, B.L., Snyder, L.: High-level Language Support for User-defined Reductions. Journal of Supercomputing 23(1), 23–37 (2002)zbMATHCrossRefGoogle Scholar
  6. 6.
    Becker, P. (ed.): Working Draft: Standard for Programming Language C++ (November 2009); Document number N3000Google Scholar
  7. 7.
    Frigo, M., Halpern, P., Leiserson, C.E., Lewin-Berlin, S.: Reducers and Other Cilk++ Hyperobjects. In: Proc. of the 21st Ann. Symp. on Parallelism in Algorithms and Architectures, Calgary, AB, Canada, August 2009, pp. 79–90 (2009)Google Scholar
  8. 8.
    Gregor, D., Järvi, J., Siek, J., Stroustrup, B., Lumsdaine, A., Dos Reis, G.: Concepts: Linguistic Support for Generic Programming in C++. In: Proc. of the 2006 ACM SIGPLAN Conf. on Object-oriented Programming, Systems, Languages, and Applications, Portland, OR, October 2006, pp. 291–310 (2006)Google Scholar
  9. 9.
    IEEE. Threads Extension for Portable Operating Systems (Draft 6), Document P1003.4a/D6 (February 1992)Google Scholar
  10. 10.
    ISO/IEC. Programming Languages – C, ISO/IEC 9899:1999 (1999)Google Scholar
  11. 11.
    ISO/IEC. Programming Languages – C++, ISO/IEC 14882:2003 (2003)Google Scholar
  12. 12.
    Kambadur, P., Gregor, D., Lumsdaine, A.: OpenMP Extensions for Generic Libraries. In: Eigenmann, R., de Supinski, B.R. (eds.) IWOMP 2008. LNCS, vol. 5004, pp. 123–133. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  13. 13.
    Klemm, M., Veldema, R., Bezold, M., Philippsen, M.: Proposal for OpenMP for Java. 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. 409–421. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  14. 14.
    McGrady, D.: Avoiding Contention using Combinable Objects (September 2008), http://blogs.msdn.com/nativeconcurrency/archive/2008/09/25/avoiding-contention-using-combinable-objects.aspx
  15. 15.
    Michaelis, M.: Essential C# 3.0: For.NET Framework 3.5 (Microsoft.Net Development), 2nd edn. Addison-Wesley Longman, Amsterdam (September 2008)Google Scholar
  16. 16.
    Microsoft Developer Network. Process and Thread Functions (Windows), http://msdn.microsoft.com/en-us/library/ms684847%28VS.85%29aspx
  17. 17.
    MPI Forum. MPI: Extensions to the Message-passing Interface, Version 2.2. Technical report, MPI Forum (September 2009)Google Scholar
  18. 18.
    Oaks, S., Wong, H.: Java Threads, 3rd edn. O’Reilly, Sebastopol (2004)Google Scholar
  19. 19.
    OpenMP ARB. OpenMP Application Program Interface, v. 3.0 (May 2008)Google Scholar
  20. 20.
    Reinders, J.: Intel Threading Building Blocks. O’Reilly, Sebastopol (July 2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Alejandro Duran
    • 1
  • Roger Ferrer
    • 1
  • Michael Klemm
    • 2
  • Bronis R. de Supinski
    • 3
  • Eduard Ayguadé
    • 1
    • 4
  1. 1.Barcelona Supercomputing Center 
  2. 2.Intel Corporation 
  3. 3.Lawrence Livermore National Laboratory 
  4. 4.Universitat Politècnica de Catalunya 

Personalised recommendations