CS-E4580 Programming Parallel Computers

Spring 2017 · Department of Computer Science · Aalto University

News Shortcuts Overview Exercises Material Additional reading


Please note that all information here is related to spring 2017. You can find the web pages of spring 2018 here.


This is a practical hands-on course on algorithm engineering for modern parallel computers. You will learn how to design programs that make the best possible use of the computing power of multicore CPUs and GPUs.



Please use the same user name on both GitHub and Slack. Please also make sure your real name (first name + last name) is set correctly in Slack. In Slack, join channels #mf, #cp, #is, #so, and #nn for task-specific discussions, channel #prereq for support with the prerequisite test and Github accounts, and channel #feedback to give feedback on this course.


Teaching assistants


A good understanding of computer programming, algorithms and data structures, and a working knowledge of either C or C++ programming language. You will need to complete a prerequisite test before you can start to solve assignments.

Required parts

Solve programming exercises, correctly and efficiently, and return your solutions on time via GitHub. There are both “basic exercises” and “challenging exercises”. If you solve all basic exercises correctly, you can get up to 60 points. You will need at least 30 points for a grade of 1/5 and at least 50 points for a grade of 5/5.

Optional parts

There are 6 × 1 lectures and 6 × 2 exercises sessions, which you are encouraged to attend. You can also take part in the online discussions in Slack.

In addition to basic exercises, there are also plenty of more challenging exercises. The course ends with a contest in which the fastest solutions get additional points. You can solve challenging exercises instead of basic exercises, or in addition to basic exercises. You can get much more than 60 points in total, and the students with the highest number of points will get a special award.


5 credits / 6 week ≈ 22 hours of work per week.


The following table shows how many points you can get from each task (assuming it meets all requirements), depending on when you return it. All deadlines are on Sundays, at 23:59. The deadlines are strict; in particular, you will not get any points for any solution that you return after Sunday, 21 May, at 23:59. In case of illness, please get a doctor’s certificate and contact the lecturer ASAP.


Week 1Week 2Week 3Week 4Week 5Week 6Feedback
16 April23 April30 April7 May14 May21 May1 June
median filtering
MF15 R33333
MF255 R3333
MF3 × +555555
MF4 × +555555
correlated pairs
CP15 R33333
CP255 R3333
CP3555 R333
CP4 +555 R333
CP5 × #555555
CP6 × #555555
CP7 × #555555
CP81010101010 R6
CP9 +101010101010 R
image segmentation
IS1 +5555 R33
IS2 ×555555
IS3 ×555555
SO1 +5555 R33
SO2 × +555555
SO3 ×555555
SO4 ×555555
neural networks
NN1 × #555
NN2 × #555
feedback1 R


R = recommended path. If you follow this path, you will get 10 points per week, plus 1 point for providing course feedback, i.e., 61 points in total. For the grade of 5/5, you will need at least 50 points.

× = challenging tasks. Yes, it is possible to pass the course with more than 100 points in total!

+ = these problems take part in the contest – bonus points are available for the fastest solutions!

# = open-ended tasks. We do not provide any specific time limits, code templates, or automatic grading scripts. In these tasks you are also expected to write a short report (instead of or in addition to doing some programming). You will submit your solution via GitHub, but our teaching assistants will do the grading.


For normal tasks, we will provide a code template and an automatic grading script. For these tasks, the grading is based on the following principles:

See the grading script for more details regarding the point thresholds of each task (run ./grading info).

You can resubmit your solutions at any point during the course, for any reason, and it will be graded again as if it was your first submission. You will never lose any points by resubmitting; we will keep track of the highest number of points that you have got for each task. Even if you have already got full points for a task, you can nevertheless resubmit your solutions later in order to do better in the contest.


For benchmarking, use the computers in Maari-A classroom:

For remote access, first open an ssh connection to one of the general-purpose Linux servers (kosh.aalto.fi, lyta.aalto.fi) and then ssh to one of the classroom computers (albatrossi, broileri, dodo, drontti, emu, fasaani, flamingo, iibis, kakadu, kalkkuna, karakara, kasuaari, kiuru, kiwi, kolibri, kondori, kookaburra, koskelo, kuukkeli, lunni, moa, pelikaani, pitohui, pulu, ruokki, siira, strutsi, suula, tavi, tukaani, undulaatti).

Computers in Maari-C should be identical to those in Maari-A, and you may consider using them, too (akaatti, akvamariini, ametisti, baryytti, berylli, fluoriitti, granaatti, hypersteeni, jade, jaspis, karneoli, korundi, kuukivi, malakiitti, meripihka, opaali, peridootti, rubiini, safiiri, sitriini, smaragdi, spektroliitti, spinelli, timantti, topaasi, turkoosi, turmaliini, vuorikide, zirkoni). To find a computer with a low load, see ppc-helpers.

You should be able to use directly e.g. ssh albatrossi on kosh without entering a password. If this does not work, please try to run first kinit and enter your password to renew your Kerberos tickets (required once a week).

Submitting solutions, receiving feedback

We will use the Git version control system, Git repositories on GitHub servers, and an automatic grading tool that you can run locally. Read the instructions on the GitHub workflow for more details.

Additional rules

Your code can be written in C++11 or C++14, as long as it compiles correctly on the classroom computers, using the compilers installed there (GCC 5.4). For GPU tasks, you will have to use CUDA, and again it has to compile correctly on the classroom computers, using the compilers installed there (NVCC 7.5).

You are encouraged to discuss solution ideas with other students and the course staff, but the code that you submit has to be written by yourself. You can use ideas that you find online, but you are not allowed to directly copy source code.

Here are some technical rules; please try to use common sense, and feel free to ask the course staff if you are unsure:

Course material

There is no textbook. Lecture slides and additional material will be posted here after each lecture.

In the meantime, you can have a look at the course material from 2016.



Other material

Additional reading


Programming: OpenMP

Programming: shared memory and concurrency

Programming: SIMD

Programming: CUDA

Programming: OpenCL

Programming: other

Tools: version control

Tools: profiling and debugging