|
Computer Science 400 Parallel Processing Siena College Fall 2008
|
|
Lecture 05: More OpenMP
Date: Wednesday, October 1, 2008
- Announcements and reminders
- Lecture assignment recap
- Loop scheduling
- Mandelbrot set calculation
- OpenMP loop scheduling directives
- Lab practice: using the Totalview debugger
- Lab 5 out - Jacobi iteration
Due at the start of class, Wednesday, October 8.
Turn in short answers to these questions. Please turn in a hard
copy (typeset or handwritten are OK). We will discuss these questions
during class, so no late submissions are accepted.
The readings for next time are Quinn Chapter 4.
Consider a computation that consists of 40 tasks executed in a for
loop that is being parallelized by OpenMP. The first 10 tasks each
have a computational cost of 50 (i.e., they take 50 time units each to
execute). The next 10 each have a cost of 100. The next 10 each have
a cost of 25. The last 10 each have a cost of 75.
- Using 4 threads and the default static loop scheduling, how long
will the computation take to run? What is the parallel efficiency?
- Now, suppose we have a chunk size of 1 with a static schedule.
How long will the computation take and what is the parallel
efficiency?
- Suppose we switch to a dynamic schedule. How long will the
computation take and what is the parallel efficiency?
- Under what circumstances will the dynamic schedule be more
efficient than the static schedule with a chunk size of 1?