---
# System prepended metadata

title: Introduction to GPU programming with OpenMP

---

# Introduction to GPU programming with OpenMP

This note contains the up-to-date information during the course

## Important links

- [Zoom](https://cscfi.zoom.us/j/66122436088)
- [Course github](https://github.com/csc-training/openmp-offload)
- [Lecture slides (full handout)](https://kannu.csc.fi/s/MbnraE62YSdt6ad)
- This note: https://hackmd.io/@jussienko/openmp-offload

## Useful material
- [OpenMP standards](https://www.openmp.org/specifications/)
- [NVIDIA HPC SDK Documentation](https://docs.nvidia.com/hpc-sdk/compilers/index.html) 

## Exercises for current session

Controlling data movement


## Quiz


## Questions / comments

Feel free to contribute

https://hackmd.io/@jussienko/openmp-offload

## Agenda


| Tuesday | |
| -------- | -------- |
|14:15 - 15:00 | [Introduction to accelerated HPC](https://kannu.csc.fi/s/LRG4WpwXN3oj5jZ)|
|15:15 - 16:00 | [Crash course on parallel programming](https://kannu.csc.fi/s/LWJZ3PfTa6HTfWB)|
|16:00 - 16:15 | break |
|16:15 - 17:00 | [Introduction to OpenMP offloading](https://kannu.csc.fi/s/5gqeiKHAAYcPCEe)|
|17:00 - 18:00 | Dinner|
|18:00 - 21:00 | Exercises|

| Wednesday | |
| -------- | -------- |
|14:00 - 14:45 | [Controlling data movement](https://kannu.csc.fi/s/7naw7H6CNsRjqKd)|
|14:45 - 15:30 | Exercises|
|15:30 - 16:15 | [Persistent data](https://kannu.csc.fi/s/niDqafyjdNyWdDi) and [device functions](https://kannu.csc.fi/s/ozyDN5Tb8mNGog6)|
|16:15 - 17:00 | Exercises|
|17:00 - 18:00 | Dinner|
|18:00 - 21:00 | Optional exercises|

| Thursday | |
| -------- | -------- |
|09:00 - 09:45 | [Interoperability](https://kannu.csc.fi/s/pHq7Db4EfEs4S9o) with libraries and [asynchronous operations](https://kannu.csc.fi/s/mSGZeyfS9nf2mPx)|
|09:45 - 10:30 | Exercises|
|10:30 - 11:15 | [Using multiple GPUs](https://kannu.csc.fi/s/iBMXK5b7TRrdAzC)|
|11:15 - 12:00 | Exercises|

| Friday | |
| -------- | -------- |
|09:00 - 11:00 | Optional exercise session|


## Introductory quiz

1. My choice of programming language

   A. Fortran

   B. plain C
   C. C++

   A. xxx
   B. xx
   C. xxxxxxx

2. My previous experience with MPI

   A. I use MPI regularly
   B. I know the basics
   C. No experience

   A. x
   B. xxxxxxx
   C. xxx

3. My previous experience with OpenMP (with CPUs)

   A. I use OpenMP regularly
   B. I know the basics
   C. No experience

   A. xxxx
   B. xxxxx
   C. xxx

4. My motivation for learning OpenMP offloading

   A. I am developing an HPC application that I want to port to GPUs
   B. I am using a GPU application and want to understand it better
   C. General interest in HPC programming

   A. xxxxxxxxx
   B. xx
   C. x

5. My choice of editor :-)

   A. Emacs
   B. ~~Vi~~Vim
   C. Something else

   A. xxx
   B. xx
   C. xxxxxx


## Free discussion

Feel free to add any general remarks, tips, tricks, comments etc. here. For questions during the exercise sessions use, however, RocketChat as that will monitored more frequently