Porting code to OpenMP offloading

Questions

  • When and why should I use OpenMP offloading in my code?

  • TODO

Objectives

  • Understand TODO

  • Understand TODO

  • Understand

  • Understand

Prerequisites

  1. TODO

  2. TODO

First heading

Some text

Second heading

Some more text, with a figure

../_images/stencil.svg

This is a sample image

Exercise

TODO get the students to think about the content and answer a Zoom quiz

Some source code

Sometimes we need to look at code, which can be in the webpage and optionally you can pull out only some lines, or highlight others. Make sure both C++ and Fortran examples exist and work.

Building the code

If there’s terminal output to discuss, show something like:

nvc++ -g -O3 -fopenmp -Wall -I../common -c main.cpp -o main.o
nvc++ -g -O3 -fopenmp -Wall -I../common -c core.cpp -o core.o
nvc++ -g -O3 -fopenmp -Wall -I../common -c setup.cpp -o setup.o
nvc++ -g -O3 -fopenmp -Wall -I../common -c utilities.cpp -o utilities.o
nvc++ -g -O3 -fopenmp -Wall -I../common -c io.cpp -o io.o
nvc++ -g -O3 -fopenmp -Wall -I../common main.o core.o setup.o utilities.o io.o ../common/pngwriter.o -o heat_serial  -lpng

Running the code

To show a sample command line, use this approach

./heat_serial 800 800 1000

Keypoints

  • TODO summarize the learning outcome

  • TODO