Parallel Programming  FS '14
The purpose of this course is to introduce students to parallel programming. By the end of the course students will be able to design and implement working parallel programs in traditional (e.g., Java Threads) and emerging (e.g., GPUs) parallel programming models. Moreover, students will master fundamental concepts in parallelism and be able to reason about the correctness, performance, and the construction of parallel programs using different parallel programming paradigms (e.g., task parallelism, data parallelism) and mechanisms (e.g., threads, tasks, locks, communication channels). Finally, the course will examine how parallel programming methodologies can be applied in different algorithmic domains by investigating parallelization of algorithms.
Topics include:
Overview
 eDoz Course Nr.
 252002400L
 Lecturers
 Otmar Hilliges, Kornilios Kourtis
 Assistants
 Gerd Zellwegerzgerd+inf+ethz+ch, Simon Gerbersimon.gerber+inf+ethz+ch, Georgios Giannikisgiannikg+ethz+ch, Chothia Zaheerzchothia+ethz+ch, Daniela Dorneanudanielad+ethz+ch, Jana Gicevagicevaj+inf+ethz+ch, Georg Ofenbeckofgeorg+ethz+ch, Shinde Pravinpravin+inf+ethz+ch, Jascha Grübeljgruebel+ethz+ch, Simon Peyerpeyers+ethz+ch, Sebastian Wickiswicki+ethz+ch, Lukas Vogelluvogel+ethz+ch
 Lecture

Mon 1012 HG E7,
Tue 1012 HG G5  Exercise

Mon 1618
CAB G 52 and
CAB G 57
Thu 1315 CAB G 57, CHN D 48, HG E 33.5, ML F 40, ML H 43 and NO E 11
Fri 1315 NO E 11 and NO E 39  Office hours
 coordinate via email: otmar.hilliges@inf.ethz.ch
 ECTS credits
 7 credits
Announcements
 13.02.2014
 Course Website for Spring 2014 online.
 23.02.2014
 Students to groups assignment is now online.
 23.02.2014
 Exercise 1 is now online.
 02.03.2014
 Exercise 2 is now online.
 09.03.2014
 Exercise 3 is now online.
 10.03.2014
 Information about midterm exams is now available.
 11.03.2014
 Additional information about midterm exams is now available.
 17.03.2014
 Exercise 4 is now online.
 21.03.2014
 Exercise 5 is now online.
 31.03.2014
 Exercise 6 is now online. Notice the deadline extension.
 01.04.2014
 The grades of the first midterm are now available.
 14.04.2014
 Exercise 7 is now online. Notice the deadline extension.
 28.04.2014
 Additional information about the second midterm exam is now available.
 28.04.2014
 Exercise 8 is now online.
 06.05.2014
 Exercise 9 is now online.
 14.05.2014
 Exercise 10 is now online.
 21.05.2014
 The grades of the second midterm are now available.
 28.05.2014
 A correction of "OpenCL Case Studies (Annotated version)" is now online.
Course Content
Main text and reference book
Related resources, text and reference books
Introduction to Java books (freely available)
OpenCL
Schedule
Wk.  Date  Content  Slides 

1  17.02.2014  Course Introduction 
Slides1 Slides1(annotated) Slides2 
1  18.02.2014  Parallel Architectures 
Slides Handout 
2  24.02.2014  Basic Concepts 
Slides Handout 
2  25.02.2014  Parallel Models 
Slides Handout 
3  03.03.2014  Introduction to Programming 
Slides Slides(annotated) Handout 
3  04.03.2014  Java Basics 
Slides Slides(annotated) Handout 
4  10.03.2014  Java Loops / Objects / Classes 
Slides Handout 
4  11.03.2014  Threads 
Slides (annotated) Handout 
5  17.03.2014  Synchronization: Introduction to locks 
Slides Handout 
5  18.03.2014  Synchronization: Using locks and building threadsafe classes 
Slides Handout 
6  24.03.2014  (previous lecture continued) 

6  25.03.2014  midterm exam, no lecture 

7  31.03.2014  Synchronization: Beyond locks 
Slides (v0.2) Handout (v0.2) 
7  1.04.2014  Synchronization: Advanced (and other) topics 
Slides (v0.2) Handout (v0.2) 
8  7.04.2014  Task Parallelism 
Slides Handout 
8  8.04.2014  Transactional Memory 
Slides Handout 
9  14.04.2014  Designing Parallel Algorithms 
Slides (annotated) Handout 
9  15.04.2014  GUIs MVC 
Slides Handout 
10  28.04.2014  Concurrent message passing 
Slides Handout 
10  29.04.2014  Data parallel programming 
Slides Handout 
11  12.05.2014  Intro to Massively Parallel Programming 
Slides Handout (annotated) 
11  13.05.2014  OpenCL 
Slides Handout (annotated) 
12  20.05.2014  Guest Talk 
Talk will be at 11:0012:00 
12  21.05.2014  OpenCL Memory Model 
Slides Handout (annotated) 
13  26.05.2014  OpenCL Case Studies 
Slides Handout (annotated) 
13  27.05.2014  Recap / Q & A Session 
Slides Handout 
Exercises
The assignment of teaching assistants to rooms and time slots can be found here. The assignment of students to teaching assistants can be found here.
Exercise  Assignment  Due date 

Exercise 1  Handout Bakery Simulator Slides Solution  03.03.2014 
Exercise 2  Handout Slides Solution  10.03.2014 
Exercise 3  Handout Assignment3.zip Slides Solution Solution  17.03.2014 
Exercise 4  Handout Assignment4.zip Slides Solution Solution  26.03.2014 
Exercise 5  Handout Assignment5.zip Slides Solution Solution  31.03.2014 
Exercise 6  Handout Assignment6.zip Slides Solution Solution  14.04.2014 
Exercise 7  Handout Assignment7.zip Slides Solution  28.04.2014 
Exercise 8  Handout Assignment8.zip Solution  07.05.2014 
Exercise 9  Handout Assignment9.zip Slides Solution Solution  12.05.2014 
Exercise 10  Handout Assignment10.zip [Fixed for Mac OS] Solution  21.05.2014 
Exercise 11  Handout Assignment11.zip Solution  31.05.2014 
Exams and Grading
Class is part of BasisprÃ¼fung. There is a written, centralized exam after the end of the semester.
Exercise sessions are not graded, however they are considered essential!
Midterm Exams
There will be two midterms on the 25.03.14 and 06.05.14. The midterms are during the lecture hours and are closed book. No additional material is allowed.
First Midterm
The first midterm on Tuesday, 25.03.14. This will be happening in three rooms:
Topics include everything in the lecture up to and including week 5.
Topics from the Exercise include everything upto and including exercise 4.
The grades are available here.
Second Midterm
The second midterm on Tuesday, 06.05.14. This will be happening in three rooms:
Topics include everything in the lecture from and including week 5, upto and including week 10.
Topics from the Exercise include everything from and including exercise 5, upto and including exercise 8.
More specifically, you should study solutions for exercises 57 and just have a look at assignment 8.
The grades are available here.
You can review the exam this Friday, 23.05.2014 from 10:00 to 14:00 in room CNB H 100.5.Final Exam (BasisprÃ¼fung)
The final exam takes place on Saturday, 09.08.14 from 11:00 until 13:00 (120 minutes).
This will be held in a single room for everyone: HIL G 41
(building map)
(floor plan)
Topics include everything covered in the lectures (see annotated slides) and all the exercise material. The only written aids allowed are 4 sides (2 A4 pages) of handwritten notes. You may not use your books, addit ional notes, or any calculator on this exam.