Course syllabus
- The course includes a large project (groups of 3-5 students), where the students will write or re-write a code and evaluate how it performs on GPU(s), and implement or suggest performance improvemen.
- The course does not belong to a specific Master programme but it is a cross disciplinary course.
- What is a Tracks course?
- The course fulfils sustainable development goals (SDGs) Goal 9: Industry, Innovation and Infrastructure
Nvidia, CUDA, GPU
- Nvidia has developed a programming interface for GPUs called CUDA
- CUDA In Action - Research & Apps
- Nvidia is very active in updating CUDA
- Many companies, such as Volvo Group, Volvo Cars use Nvidia Graphic Cards which are programmed in CUDA.
- Chalmers hosts a national GPU cluster
Tracks management
- Ida Gremyr, scientific lead
- Kristina Henricson Briggs, Director Tracks kristina.henricson.briggs@chalmers.se
Teachers
- Rickard Bensow, rickard.bensow@chalmers.se
- Magnus Carlsson, Magnus Carlsson1@saabgroup.com
- Lars Davidson, lada@chalmers.se
- Fredrik Larsson, fredrik.larsson@chalmers.se
- Hari Abram, hariv@chalmers.se
- Leonard Nielsen, leoniel@chalmers.se
Application
Course content
- Introduction lectures first week on CUDA programming including two mini-workshops.
- Project.
- The students will write or re-write a code and evaluate how it performs on GPU(s), and implement or suggest performance improvement for
- item a simple CFD/FEM solver
- a Poisson solver
- a wave propagation solver
- a Lattice-Boltzmann (LB) solver
- The purpose of the LB project is to extend a CPU-based Lattice-Boltzmann fluid solver developed by Saab Aeronautics in Python to GPU. The CPU-version is utilizing the Numba Python package for parallelization, where the computational heavy routines are parallelized using shared memory. The Numba package supports GPU-parallelization and it should be straight forward to rewrite the necessary routines for full GPU-performance. The GPU-version will then be tested on a simple lid-driven cavity case. The supervisor is Magnus Carlsson at Saab Aeronautics (Email magnus.carlsson1@saabgroup.com)
- Here are examples of Python codes for Poisson, LaPlace, linear and non-linear convection, Burger's equation etc
- Here's an example of a simple 3D Poisson solver (by lada) which can be used for working on Poisson solvers
- Here's an example of a vectorized Poisson solver (by lada) which can be used for working on Poisson solvers
- Here's a 2D CFD codepyCALC-RANS (by lada)/li>
- Here's an example of a finite volume code written in CUDU (by lada)
- Here are examples of student reports from the Track course 2022-2023
- Students who choose to do a CFD project may start with a CFD Python code (by lada) with a turbulence model or a simpler Navier-Stokes code
- profiling (GPU time, uploading/downloading data to/from the GPU etc)
- Written and oral presentation of the project
- The students will write or re-write a code and evaluate how it performs on GPU(s), and implement or suggest performance improvement for
Time table. For locations, see TimeEdit
- 6 Nov 13.15-15.00. Workshop 1 on GPU. Hari Abram.
- 11 Nov 13.15-15.00 Introduction to CFD. Lars Davidson.
- 13 Nov 13.15-15.00. Workshop 2 on GPU. Hari Abram.
- 18 Nov 10.00-11.45. Introduction to FEM, Fredrik Larsson
- 18 Nov 13.15-15.00 Using GPU on C3SE. Leonard Nielsen
- 9 Dec 13.15-16.00. Mid-term workshop. Presentation of all student groups on status of the project
- 22 Jan 13,.15-16.00. Final workshop. Presentation of all student groups
Learning outcomes
General learning outcomes are found in the course description of TRA105 - Tracks advanced 1
Detailed learning outcomes
- be able to programme numerical solvers in Python
- be able to programme in CUDA
- be able to profile the programme
Course PM
The first lecture (including mini workshop) will take place on Thursday 7 Nov at 13.00-15.00 in Room SB3-L112 followed by another four lectures (see Time table above). The remaining of the course will mainly be project work and project meetings (once a week). The times for the meetings will be determined by each project group.
Please bring a lap-top to the first lecture. It is not necessary that your lap-top has a Nvidia graphics card.
A large part of the course will consist of a programming project. It should be on either FEM, CFD or solving a Poisson equation or the wave propagation equation. Please send an Email to lada@chalmers.se giving your preference. We will then form groups of 3-4 students.
We will arrange a mid-term meeting where the project groups will give a short presentation of the status of their project
At the end of the course (probably in the exam week), we will organize a workshop where all project groups will present their work. The project groups should also submit a report.
How to run on GPUs using Chalmers computers
Here you find information on how to use Chalmers computers.
Using the Vera compute cluster
Slides from GPU on Vera lecture
IMPORTANT!
To use Vera, you need to register on the project C3SE 2025/2-17 and apply for an account here
Detailed instructions for applying can be found here
Once you have a Vera account:
You can connect to the Vera OnDemand portal, where you can get remote desktop sessions, VSCode editors and Jupyter Notebooks connected to compute nodes with GPU:s directly in your browser, here.
You can find instructions on connecting to remote desktop sessions on the login nodes here. You can use the login nodes to do editing work or to submit batch jobs to compute nodes. The login nodes have GPU:s and you can run quick debugging or sanity check tests on those (e.g. to see if your code can detect GPU:s), as long as they do not use a large amount of GPU memory or take more than a minute or so. The login nodes are shared resources and you should be wary not to put excessive strain on them.
You can find instructions on connecting over SSH here.