Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 1.82 KB

README.md

File metadata and controls

9 lines (5 loc) · 1.82 KB

Tutorial: "Differences between OpenACC and OpenMP offloading models"

Organisers: Maciej Cytowski (PawseySC), Tom Papatheodore (ORNL), Chris Daley (LBL)

OpenACC and OpenMP are often seen as competing solutions for directive-based GPU offloading. Both models allow the programmer to offload computational workloads to run on GPUs and to manage data transfers between CPU and GPU memories. OpenACC is said to be a descriptive approach to programming GPUs, where the programmer uses directives to tell the compiler where data-independent loops are located and lets the compiler decide how/where to parallelize the loops based on the architecture (via compiler flags). OpenMP, on the other hand, is said to be a prescriptive approach to GPU programming, where the programmer uses directives to more explicitly tell the compiler how/where to parallelize the loops, instead of letting the compiler decide.

It’s common to hear programmers ask, “which programming model should I use?”, “which approach is more portable?”, “are one of these models going to replace the other?”, etc. In this tutorial, we will not attempt to argue for one programming model over the other or specifically try to compare their performance profiles. Instead, we will explore the differences between the two approaches briefly outlined above and give participants the opportunity to explore how these differences manifest themselves when implementing a program during hands-on exercises. We will also give a current snapshot of the compiler implementations available for OpenACC and OpenMP(GPU). This “developer view” of exploring the programming models is intended to give participants a foundation of information to help guide them in choosing which model works best for their application.

Step-by-step guide: https://pawseysc.github.io/sc20-gpu-offloading