OpenMP is a cross-platform multi-threading API which allows fine-grained task parallelization and synchronization using special compiler directives.
OpenMP is a cross-platform multi-threading API which allows fine-grained task parallelization and synchronization using special compiler directives. OpenMP offers easy access to multi-threading without requiring knowledge of system-dependent details. At the same time, it is reasonably efficient compared to fine-tuned implementations with the bonus of being easiest to write multi-threads code. Forums and complete information on OpenMP is at https://openmp.org/.
OpenMP is based on multi-thread model, and offers Shared Memory parallelism and heterogeneous programming for coprocessors through compiler directives, library routines and environment variables. It is restricted to C/C++ and Fortran applications, however provides portability across different Shared Memory architectures.
It is through directives, added by the programmer to the code, that the compiler adds parallelism in the application. OpenMP can be used in single or multi-cores machines, in the first architecture the compiler directives are ignored, thus the application is executed in a sequential manner, promoting portability between the two architectures.
Latest version is 5.2 (November 2021): Official OpenMP specifications.
Definitive Book Guide
- Using OpenMP: Portable Shared Memory Parallel Programming - Barbara Chapman et al.
- Using OpenMP - The Next Step: Affinity, Accelerators, Tasking, and SIMD - Ruud van der Pas et al.
- Parallel Programming in OpenMP - Rohit Chandra.
- An Introduction to Parallel Programming - Peter Pacheco.
- Parallel Programming in C with MPI and OpenMP - Michael J. Quinn.
Helpful links