COMP 322: Fundamentals of Parallel Programming (Spring 2012)
Instructor: |
Prof. Vivek Sarkar, DH 3131 |
Graduate TA: |
|
---|---|---|---|
|
Please send all emails to comp322-staff at rice dot edu |
Graduate TA: |
|
Assistant: |
Amanda Nokleby, akn3@rice.edu, DH 3137 |
Graduate TA: |
|
|
|
Undergrad TA: |
|
|
|
Undergrad TA: |
Damien Stone |
Cross-listing: |
ELEC 323 |
Undergrad TA: |
Yunming Zhang |
|
|
Research Programmer: |
Vincent Cavé |
Lectures: |
Brockman 101 (new location effective 1/18/2012) |
Lecture times: |
MWF 1:00 - 1:50pm |
Labs: |
Ryon 102 |
Lab times: |
Tuesday, 4:00 - 5:20pm (Section 3) |
|
|
|
Wednesday, 3:30 - 4:50pm (Section 2) |
|
|
|
Thursday, 4:00 - 5:20pm (Section 1) |
Introduction
The goal of COMP 322 is to introduce you to the fundamentals of parallel programming and parallel algorithms, using a pedagogical approach that exposes you to the intellectual challenges in parallel software without enmeshing you in low-level details of different parallel systems. To that end, the main pre-requisite course requirement is COMP 215 or equivalent. This course should be accessible to anyone familiar with the foundations of sequential algorithms and data structures, and with basic Java programming. COMP 221 is also recommended as a co-requisite.
The pedagogical approach will introduce you to the following foundations of parallel programming:
- Primitive constructs for task creation & termination, collective & point-to-point synchronization, task and data distribution, and data parallelism
- Abstract models of parallel computations and computation graphs
- Parallel algorithms and data structures including lists, strings, trees, graphs, matrices
- Common parallel programming patterns including task parallelism, undirected and directed synchronization, data parallelism, divide-and-conquer parallelism, map-reduce, concurrent event processing including graphical user interfaces.
Laboratory assignments will explore these topics through a simple parallel extension to the Java language called Habanero-Java (HJ), developed in the Habanero Multicore Software Research project at Rice University. The use of Java will be confined to a subset of the Java 1.4 language that should also be accessible to C programmers --- no advanced Java features (e.g., generics) will be used. An abstract performance model for HJ programs will be available to aid you in complexity analysis of parallel programs before you embark on performance evaluations on real parallel machines. We will conclude the course by introducing you to some real-world parallel programming models including the Java Concurrency Utilities, Google's MapReduce, CUDA and MPI. The foundations gained in this course will prepare you for advanced courses on Parallel Computing offered at Rice (COMP 422, COMP 522).
Since the aim of the course is for you to gain both theoretical and practical knowledge of the foundations of parallel programming, the weightage for course work will be balanced across homeworks, exams, and lab attendance.
Textbooks
There are no required textbooks for the class. You will be expected to read each lecture handout before coming to the lecture. We will also provide a number of references in the slides and handouts.
However, there are a few optional textbooks that we will draw from quite heavily. You are encouraged to get copies of any or all of these books. They will serve as useful references both during and after this course:
- Java Concurrency in Practice by Brian Goetz with Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes and Doug Lea
- Principles of Parallel Programming by Calvin Lin and Lawrence Snyder
- The Art of Multiprocessor Programming by Maurice Herlihy and Nir Shavit
Lecture Schedule
|
Day |
Date (2012) |
Topic |
Slides |
Audio (Panopto) |
Code Examples |
Handouts |
Homework Assigned |
Homework Due |
---|---|---|---|---|---|---|---|---|---|
1 |
Mon |
Jan 9 |
Lecture 1: The What and Why of Parallel Programming |
|
|
|
|||
2 |
Wed |
Jan 11 |
Lecture 2: Async-Finish Parallel Programming and Computation Graphs |
|
|
|
|||
3 |
Fri |
Jan 13 |
Lecture 3: Computation Graphs, Abstract Performance Metrics, Array Reductions |
|
HW1 |
||||
- |
Mon |
Jan 16 |
School Holiday |
|
|
|
|
|
|
4 |
Wed |
Jan 18 |
Lecture 4: Parallel Speedup, Efficiency, Amdahl's Law |
|
|
|
|
||
5 |
Fri |
Jan 20 |
Lecture 5: Data & Control Flow with Async Tasks, Data Races |
(See Lab 3) |
|
|
|
||
6 |
Mon |
Jan 23 |
Lecture 6: Memory Models, Atomic Variables |
(See Lab 3) |
|
|
|
||
7 |
Wed |
Jan 25 |
Lecture 7: Memory Models (contd), Futures --- Tasks with Return Values |
|
|
|
|||
8 |
Fri |
Jan 27 |
Lecture 8: Futures (contd), Dataflow Programming, Data-Driven Tasks |
|
|
|
|||
9 |
Mon |
Jan 30 |
Lecture 9: Abstract vs. Real Performance, seq clause, forasync loops |
|
|
HW2 |
|||
10 |
Wed |
Feb 01 |
Lecture 10: Forasync Chunking, Parallel Prefix Sum algorithm |
|
|
|
|||
11 |
Fri |
Feb 03 |
Lecture 11: Parallel Prefix Sum (contd), Parallel Quicksort |
|
|
|
|||
12 |
Mon |
Feb 06 |
Lecture 12: Finish Accumulators, Forall Loops and Barrier Synchronization |
|
|
|
|
||
13 |
Wed |
Feb 08 |
Lecture 13: Forall Loops and Barrier Synchronization (contd) |
[OneDimAveraging.h |
^OneDimAveraging.hj]j |
^OneDimAveraging.hj]j |
The purpose of the homeworks is to train you to solve problems and to help deepen your understanding of concepts introduced in class. Homeworks and programming assignments are due on the dates and times specified in the course schedule. Please turn in all your homeworks using the CLEAR turn-in system. Homework is worth full credit when turned in on time. A 10% penalty per day will be levied on late homeworks, up to a maximum of 6 days. No submissions will be accepted more than 6 days after the due date.
You will be expected to follow the Honor Code in all homeworks and exams. All submitted homeworks are expected to be the result of your individual effort. You are free to discuss course material and approaches to problems with your other classmates, the teaching assistants and the professor, but you should never misrepresent someone else’s work as your own. If you use any material from external sources, you must provide proper attribution ([as shown here|http://www.dartmouth.edu/~writing/sources/]). Exams 1 and 2, which are pledged under the Honor Code, test your individual understanding and knowledge of the material. Collaboration on exams is strictly forbidden. Finally, it is also your responsibility to protect your homeworks and exams from unauthorized access.
Graded homeworks will be returned to you via email, and exams as marked-up hardcopies. If you believe we have made an error in grading your homework or exam, please bring the matter to our attention within one week.
Past Offerings of COMP 322
Accommodations for Students with Special Needs
Students with disabilities are encouraged to contact me during the first two weeks of class regarding any special needs. Students with disabilities should also contact Disabled Student Services in the Ley Student Center and the Rice Disability Support Services.