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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 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
OpenMP Forum. http://openmp.org/
OpenMP Fortran Application Program Interface (1997), http://www.openmp.org/mp-documents/fspec10.pdf. Oct 1997
OpenMP Application Program Interface Version 4.0 (2013), http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf. July 2013
OpenACC Home. http://www.openacc.org/
OpenACC 2.0 Specification. https://www.openacc.org/sites/default/files/inline-files/OpenACC_2_0_specification.pdf
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this chapter
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)