Skip to content

Public repository for the 2019 Parallel Functional Programming course at DIKU

Notifications You must be signed in to change notification settings

TVAO/pfp-e2019-pub

 
 

Repository files navigation

Parallel Functional Programming, Block 2 2019

PFP is structured around five weeks with lectures and lab sessions on Monday and Wednesday, followed by a final project to be presented orally at the exam. Throughout the course, you will hand in four weekly assignments. These weeklies count for 40% of the grade, while the exam counts for 60%.

The teachers are Cosmin Oancea and Troels Henriksen.

All lectures and lab sessions will be delivered in English. The assignments and projects will be posted in English, and while you can chose to hand in solutions in either English or Danish, English is preferred.

All course material is distributed via this GitHub page. Assignment handin is still on Absalon. There is no mandated textbook for the course - you will be assigned reading material from papers and such.

Course schedule

This course schedule is tentative and will be updated as we go along.

The lab sessions are aimed at providing help for the weeklies and group project. Do not assume you can solve them without showing up to the lab sessions.

On Monday, we are in "Kursussal 3" at "Zoo" (a building connected to the museum of zoology).

On Wednesday, we are at DIKU in classroom 1-0-22 from 10:00-12:00 and in classrom 1-0-26 from 13:00-15:00.

Note that the order of labs and lectures are swapped for the first three teaching days.

Date Time Topic Material
18/11 13:00-15:00 Cancelled
18/11 15:00-17:00 Intro, deterministic parallelism, data parallelism, Futhark Parallel Programming in Futhark, sections 1-4
20/11 10:00-12:00 Lab (Assignment 1 handout) Futhark exercises
20/11 13:00-15:00 Cost models, advanced Futhark Guy Blelloch: Programming Parallel Algorithms, Prefix Sums and Their Applications, A Provable Time and Space Efficient Implementation of NESL
25/11 13:00-15:00 Lab
25/11 15:00-17:00 Regular flattening: moderate and incremental Futhark: Purely Functional GPU-Programming with Nested Parallelism and In-Place Array Updates, Incremental Flattening for Nested Data Parallelism (particularly the latter)
27/11 10:00-12:00 Full/irregular flattening Transforming High-Level Data-Parallel Programs into Vector Operations, Harnessing the Multicores: Nested Data Parallelism in Haskell (not easy to read)
27/11 13:00-15:00 Lab (Assignment 2 handout)
2/12 13:00-15:00 Task parallelism (parallel Haskell) (code) Parallel and Concurrent Programming in Haskell, chapter 4. Seq no more: Better Strategies for Parallel Haskell
2/12 15:00-17:00 Lab
4/12 10:00-12:00 Halide Halide: A Language and Compiler for Optimizing Parallelism, Locality and Recomputation in Image Processing Pipelines
4/12 13:00-15:00 Lab (Assignment 3 handout)
9/12 13:00-15:00 Polyhedral Analysis PMPH Dependence Analysis; Sven Verdoolaege: Presburger Formulas and Polyhedral Compilation (tutorial); Sven Verdoolaege: Presburger Sets and Relations: from High-Level Modelling to Low-Level Implementation (slides)
9/12 15:00-17:00 Lab Code Examples Using the ISLPY library
11/12 10:00-12:00 Vector programming with ISPC ispc: A SPMD Compiler for High-Performance CPU Programming
11/12 13:00-15:00 Lab (Assignment 4 handout)
16/12 13:00-15:00 Optimizing Locality of Reference Related Literature
16/12 15:00-17:00 Lab (with project proposals)
18/12 10:00-12:00 Lab
18/12 13:00-15:00 Lab

After New Years, there will be no lectures, but labs will still be held to help with the group project.

Date Time
6/1 15:00-17:00
8/1 13:00-15:00
13/1 15:00-17:00
15/1 13:00-15:00

Weekly assignments

The weekly assignments are mandatory, must be solved individually, and make up 40% of your final grade. Submission is on Absalon.

You will receive feedback a week after the handin deadline (at the latest). You then have another week to prepare a resubmission. That is, the resubmission deadline is two weeks after the original handin deadline.

Weekly 1 (due November 28)

Weekly 2 (due December 5)

Weekly 3 (due December 12)

Weekly 4 (due December 19)

Group project and exam

The final project, along with the exam as a whole, contributes 60% of your grade, and is done in groups of 1-3 people (although working alone is strongly discouraged). We have a list of project suggestions, but you are free to suggest your own (but please talk with us first). Since the time to work on the project is rather limited, and there is no possibility of resubmission, you should ask for help early and often if you are having trouble making progress. The project should be handed in via Absalon on Friday the 17th of January. Send an email if you have trouble meeting this deadline.

Most of the projects are about writing some parallel program, along with a report describing the main points and challenges of the problem. The exam format is a group presentation followed by individual questions about both your project and anything else in the curriculum. Each group prepares a common presentation with slides, and each member of the group presents non-overlapping parts of the presentation for about 10 min (or less). Then each member of the group will answer individual questions for about 10 min.

Practical information

You may find it useful to make use of DIKUs GPU machines in your work. You log in by first SSHing to the bastion server ssh-diku-apl.science.ku.dk using your KU license plate (abc123) as the user name, and then SSHing on to one of the GPU machines. Despite their names, they each have two multi-core CPUs and plenty of RAM as well.

  • gpu01-diku-apl, gpu02-diku-apl, gpu03-diku-apl have dual GTX 780 Ti GPUs.

  • phi-diku-apl has a K40 GPU.

  • gpu04-diku-apl has a GTX 2080 Ti GPU (by far the fastest).

All machines should have all the software installed you need. If you are missing something, contact Troels. The machines have a shared home directory (which is very slow), except gpu01-diku-apl, which has its own home directory (which is a little faster).

GPU setup

For CUDA to work, you may need to add the following to your $HOME/.bash_profile:

CUDA_DIR=/usr/local/cuda
export PATH=$CUDA_DIR/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_DIR/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBRARY_PATH
export CPLUS_INCLUDE_PATH=$CUDA_DIR/include:$CPLUS_INCLUDE_PATH
export C_INCLUDE_PATH=$CUDA_DIR/include:$C_INCLUDE_PATH

Other resources

You are not expected to read/watch the following unless otherwise noted, but they contain useful and interesting background information.

About

Public repository for the 2019 Parallel Functional Programming course at DIKU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 31.4%
  • C++ 30.8%
  • Python 21.3%
  • C 14.7%
  • Makefile 1.8%