Skip to main content
  • 994 Accesses

Abstract

This chapter explains the basics of OpenMP programming, which is widely used in parallel programming language for thread parallelization with inside node parallelism. Specifications of major constructs and clauses for OpenMP are explained with several examples of programming. Scheduling, which is a job allocation method for OpenMP, is also explained. Code optimization techniques for OpenMP, named First Touch, is also shown. Finally, the possibility of extension to Graphics Processing Unit (GPU) from programming with OpenMP is explained with OpenMP version 4.0 and OpenACC.

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 99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 129.99
Price excludes VAT (USA)
  • Durable hardcover 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

Notes

  1. 1.

    An exception is the loop that occurs just after the parallel do construct. The loop induction variable in the loop becomes a private variable automatically. Some compilers provide automatic variable privatization of loop induction variables, but this is against the specification of OpenMP. Hence, the readers need to realize that the variable privatization is a compiler specific process.

References

  1. OpenMP Forum. http://openmp.org/

  2. OpenMP Fortran Application Program Interface (1997), http://www.openmp.org/mp-documents/fspec10.pdf. Oct 1997

  3. OpenMP Application Program Interface Version 4.0 (2013), http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf. July 2013

  4. OpenACC Home. http://www.openacc.org/

  5. OpenACC 2.0 Specification. https://www.openacc.org/sites/default/files/inline-files/OpenACC_2_0_specification.pdf

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Takahiro Katagiri .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Singapore Pte Ltd.

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Katagiri, T. (2019). Basics of OpenMP Programming. In: Geshi, M. (eds) The Art of High Performance Computing for Computational Science, Vol. 1. Springer, Singapore. https://doi.org/10.1007/978-981-13-6194-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-981-13-6194-4_3

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-13-6193-7

  • Online ISBN: 978-981-13-6194-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics