Skip to main content

A Proposal for OpenMP for Java

  • Conference paper
OpenMP Shared Memory Parallel Programming (IWOMP 2005)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4315))

Included in the following conference series:

Abstract

The current OpenMP 2.5 specification does not include a binding for Java. However, Java is a wide-spread programming language that is even used for HPC programming. We propose an adaptation of OpenMP to Java by retrofitting the basic OpenMP directives to Java and further propose some new concepts to make OpenMP fit into Java’s language philosophy.

We discuss how Java’s memory model matches OpenMP’s memory model and how the OpenMP bindings for Java and C++ differ. We also suggest how to achieve flexibility of an OpenMP implementation by allowing both Java threads (java.lang.Thread) and Java tasks (java.util.concurrent.FutureTask) as an underlying means of parallelization.

Support for object-orientation is added to allow OpenMP to better suit the Java programming model. For example, we suggest a parallel for-each loop over Java collections, OO-based reductions, and object-cloning semantics to adapt data-sharing clauses to Java. Also, we suggest a minimal runtime library to allow object-pooling to circumvent any implicit synchronization involved in object allocations.

Finally, we present some performance numbers for a reference implementation in a research compiler.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Intel C++ Compiler for Linux Systems User’s Guide, Document Number 253254–031 (2004)

    Google Scholar 

  2. Alpern, B., Attanasio, C.R., Barton, J.J., Burke, M.G., Cheng, P., Choi, J.-D., Cocchi, A., Fink, S.J., Grove, D., Hind, M., Hummel, S.F., Lieber, D., Litvinov, V., Mergen, M.F., Ngo, T., Russell, J.R., Sarkar, V., Serrano, M.J., Shepherd, J.C., Smith, S.E., Sreedhar, V.C., Srinivasan, H., Whaley, J.: The Jalapeño Virtual Machine. IBM System Journal 29(1), 211–238 (2000)

    Article  Google Scholar 

  3. Artigas, P.V., Gupta, M., Midkiff, S.P., Moreira, J.E.: High Performance Numerical Computing in Java: Language and Compiler Issues. In: Proc. of the 12th Intl. Workshop on Languages and Compilers for Parallel Computing, San Diego, CA, USA, pp. 1–17 (1999)

    Google Scholar 

  4. Bailey, D.H., Barszcz, E., Barton, J.T., Browning, D.S., Carter, R.L., Dagum, D., Fatoohi, R.A., Frederickson, P.O., Lasinski, T.A., Schreiber, R.S., Simon, H.D., Venkatakrishnan, V., Weeratunga, S.K.: The NAS Parallel Benchmarks. The Intl. Journal of Supercomputer Applications 5(3), 63–73 (1991)

    Article  Google Scholar 

  5. Brunschen, C., Brorsson, M.: OdinMP/CCp - a Portable Implementation of OpenMP for C. Concurrency: Practice and Experience 12(12), 1193–1203 (2000)

    Article  MATH  Google Scholar 

  6. Bull, J.M., Kambites, M.E.: JOMP—an OpenMP-like Interface for Java. In: Proc. of the ACM 2000 Conf. on Java Grande, San Francisco, CA, USA, pp. 44–53 (2000)

    Google Scholar 

  7. Danaher, J.S., Lee, I.A., Leiserson, C.E.: Programming with Exceptions in JCilk. The Journal of Science of Computer Programming (to appear, 2006)

    Google Scholar 

  8. Flanagan, C., Rustan, K., Leino, M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for java. In: Proc. of the ACM SIGPLAN 2002 Conf. on Programming Language Design and Implementation, Berlin, Germany, pp. 234–245 (2002)

    Google Scholar 

  9. Frumkin, M., Schultz, M., Jin, H., Yan, J.: Implementation of NAS Parallel Benchmarks in Java. Technical Report NAS-02-009, Ames Research Center, Moffett Field, CA, USA (2002)

    Google Scholar 

  10. Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 3rd edn. Addison-Wesley, Upper Saddle River, NJ, USA (2005)

    Google Scholar 

  11. Hoeflinger, J.P., de Supinski, B.R.: The OpenMP Memory Model. In: Proc. of the 1st Intl. Workshop on OpenMP (IWOMP 2005), Eugene, OR, USA (May 2005)

    Google Scholar 

  12. http://kano.net/javabench

  13. http://open64.sourceforge.net

  14. http://www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm

  15. http://www.pgroup.com/products/cdkindex.htm

  16. Liao, C., Hernandez, O., Chapman, B., Chen, W., Zheng, W.: OpenUH: An Optimizing, Portable OpenMP Compiler. In: Proc. of the 12th Workshop on Compiler for Parallel Computers, A Coruna, Spain, January 2006, pp. 356–370 (2006)

    Google Scholar 

  17. Manson, J., Pugh, W., Adve, S.V.: The Java Memory Model. In: Proc. of the 32nd ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, Long Beach, CA, USA, pp. 378–391 (2005)

    Google Scholar 

  18. OpenMP C and C++ Application Program Interface, Version 2.0 (March 2002)

    Google Scholar 

  19. Pohl, T., Thürey, N., Deserno, F., Rüde, U., Lammers, P., Wellein, G., Zeiser, T.: Performance Evaluation of Parallel Large-Scale Lattice Boltzmann Applications on Three Supercomputing Architectures. In: Proc. of the IEEE/ACM Supercomputing Conf. SC 2004, Pittsburgh, PA, USA, August 2004, pp. 21–33 (2004)

    Google Scholar 

  20. Sato, M., Satoh, S., Kusano, K., Tanaka, Y.: Design of OpenMP compiler for an SMP cluster. In: Proc. of the 1st European Workshop on OpenMP, Lund, Sweden, September 1999, pp. 32–39 (1999)

    Google Scholar 

  21. Veldema, R., Hofman, R.F.H., Bhoedjang, R.A.F., Bal, H.E.: Runtime optimizations for a Java DSM implementation. In: 2001 joint ACM-ISCOPE Conf. on Java Grande, Palo Alto, CA, USA, June 2001, pp. 153–162 (2001)

    Google Scholar 

  22. Wolf-Gladrow, D.A.: Lattice-Gas Cellular Automata and Lattice Boltzmann Models. Lecture Notes in Mathematics, vol. 1725. Springer, Heidelberg (2000)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Matthias S. Mueller Barbara M. Chapman Bronis R. de Supinski Allen D. Malony Michael Voss

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Klemm, M., Veldema, R., Bezold, M., Philippsen, M. (2008). A Proposal for OpenMP for Java. In: Mueller, M.S., Chapman, B.M., de Supinski, B.R., Malony, A.D., Voss, M. (eds) OpenMP Shared Memory Parallel Programming. IWOMP 2005. Lecture Notes in Computer Science, vol 4315. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-68555-5_33

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-68555-5_33

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-68554-8

  • Online ISBN: 978-3-540-68555-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics