Parallel Computing: Lecture 5

Learning objectives

After this class, you should be able to:

  1. Explain the following: (i) fork-join model used in OpenMP, (ii) shared variable, and (iii) private variable.
  2. Given a sequential loop, parallelize it with OpenMP using the following: (i) parallel for, (ii) firstprivate, (iii) lastprivate, (iv) private, (v) omp_get_num_procs, (vi) omp_set_num_threads, (vii) omp_get_max_threads.
  3. Given a code that is incorrectly parallelized using OpenMP, point out the errors.
  4. Given code that is parallelized using OpenMP, give the output produced by it.

Reading assignment

  1. Chapter 17, up to (and including) section 17.4, note on using p690 at NCSA.
  2. Chapter 17, section 17.6.

Exercises and review questions


Last modified: 23 Jan 2007