Hide menu

Multicore and GPU programming

Information page for the CPU and GPU lab work and lessons

Lab Series

Please register for the labs via webreg by friday 4/11. Webreg will be opened at course start.

For students in lab group A (lab sessions held in ISY Southfork): Please also register on paper at lesson 1 if you never had a course in ISY, as we need to create student accounts for the computers in the ISY room where the group A labs are held.

Presence in lab sessions is mandatory.

Lab deadlines

CPU-labs (Labs 1, 2, 3): 24 nov 2016 (soft deadline), 15 dec 2016 18:00 (hard deadline)
GPU-labs (Labs 4, 5, 6): last lab session (14/15 dec 2016)

Slides

Download general informations, , the slides of lesson 1 (version with animations) and theory notes.

Getting started with tools used in laboratories

Lab0a: Introduction to C and the pthread API

A quick introduction by example to C syntax, data type and their use, functions, modules, as well as spawning and waiting for threads. Find another introduction from lab00 of the course "Concurrent programming and Operating Systems" (TDDB68), which include more C-related issues such as pointer management. Lab2 of TDDC78 (http://www.ida.liu.se/~chrke/tddb78/ also provides an introductory work to pthreads.

[source files]

Lab0b: Performance measurement: prefix sum

Introduction by example to performance measurement helper scripts.

[source files to parallelize and measure] [solution source and measurements files]

Lab work

Lab1: The Mandelbrot set and load balancing

Parallelize a generator of visual representation of the Mandelbrot set, fractals, observe load-balancing issues and implement a solution to them.

[source files] [instructions]

 

Lab2: Non-blocking stack

Implement and measure the performance of a non-blocking, Treiber stack

[source files] [instructions]

Lab3: High performance parallel sorting

Use the observations from previous labs to implement a high performance parallel sorting algorithm. The performance are measured and compared accross volonteer groups in a competition rewarding the best parallel programmers.
Find below a document that gives more detailed information on Drake, with an almost-complete Drake streaming application example.

[source files] [instructions] [drake documentation]

Lab 4: CUDA 1

lab material

Lab 5: CUDA 2

lab material

Lab 6: OpenCL / Shader programming

lab material

Multicore Sorting Contest

Register no later than 9 dec:

CPU-part 12 dec 2016, GPU-part 15 dec 2016 18:00
The winners will be presented in the last lecture (19 dec 2016).


Page responsible: Christoph W Kessler
Last updated: 2017-02-01