Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu
 
 

Repository files navigation

Programming Your GPU with OpenMP

This is a hands-on tutorial that introduces the basics of targetting GPUs with OpenMP 4.5 through a series of worked examples.

Starting with serial code, the tutorial takes you thorugh parallellising, exploring the performance characteristics, and optimising the following small programs:

  • vadd – A simple vector addition program, often considered the "hello world" of GPU programming.
  • pi – A numerical integration program that calculates and approximate value of π.
  • jac_solv – A Jacobi solver.
  • heat - An explicit finite difference 5-point stencil code.

Usage

To build all the examples:

make

To run, submit jobs using your training account:

qsub submit_vadd     # For vector add
qsub submit_pi       # For pi
qsub submit_jac_solv # For Jacobi
qsub submit_heat     # For heat

Publication history

Versions of this tutorial have been presented at SC'17, SC'18, SC'19, and virtually at SC'20 and SC'21. A version of this tutorial was presented UK OpenMP Users' Conference in 2018 and 2019.

About

Exercises and Solutions for "Programming Your GPU with OpenMP: A Hands-On Introduction"

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.