1.1. Learning Objectives#
This chapter introduces the foundational concepts of OpenMP and shared-memory parallelism. By the end of this chapter, students will be able to:
Remember & Understand
Understand the motivation for parallel computing and explain the limitations of serial execution in modern computing environments.
Describe the shared memory programming model and distinguish between shared and private variables.
Explain OpenMP’s fork-join execution model, including the roles of the master thread and worker threads during parallel regions.
Apply
Identify the basic structure of an OpenMP program and correctly insert directives to create parallel regions.
Use OpenMP runtime functions and environment variables (e.g.,
omp_set_num_threads
,OMP_NUM_THREADS
) to control and query thread behavior.
Analyze
Analyze simple OpenMP programs to detect data sharing issues such as race conditions.
Differentiate between OpenMP and other parallel programming models such as MPI and Pthreads in terms of use cases and memory models.
Evaluate
Assess the suitability of OpenMP for various computational tasks, based on program structure and target architecture.
Evaluate the readability, portability, and efficiency of OpenMP programs.
Create
Construct simple OpenMP programs using the parallel directive to demonstrate shared-memory parallelism.
Modify existing serial code to introduce parallelism while preserving correctness.