OpenACC training
Prerequisites
Who is the course for?
This training is for students, researchers, engineers and programmers who would like to quickly get started with GPU programming using OpenACC. Some previous experience with C/C++ or Fortran is required, and the lesson furthermore assumes that participants have some familiarity with the following topics:
Logging in to supercomputers and using a bash terminal
Compiling C/C++ or Fortran codes using compilers and makefiles
About the course
This lesson is an introduction to GPU programming using the directive-based OpenACC paradigm. The course consists of lectures, type-along and hands-on exercises. Topics covered include the architecture of the GPU accelerators, basic usage of OpenACC, and how to control data movement between CPUs and GPUs. Basic optimization of the code will also be covered.
After the course the participants should have the basic skills needed for utilising OpenACC with new or existing programs.
The participants are assumed to have knowledge of Fortran and/or C programming languages. Since participants will be using HPC clusters to run the examples, fluent operation in a Linux/Unix environment is assumed.
See also
There are many excellent resources online for learning OpenACC. To name only few:
Credits
The lesson file structure and browsing layout is inspired by and derived from work by CodeRefinery licensed under the MIT license. We have copied and adapted most of their license text.
Several examples and exercises in this lesson have been adapted from the following sources:
Instructional Material
All ENCCS instructional material is made available under the Creative Commons Attribution license (CC-BY-4.0). The following is a human-readable summary of (and not a substitute for) the full legal text of the CC-BY-4.0 license. You are free:
to share - copy and redistribute the material in any medium or format
to adapt - remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow these license terms:
Attribution - You must give appropriate credit (mentioning that your work is derived from work that is Copyright (c) ENCCS and, where practical, linking to https://enccs.se), provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
No additional restrictions - You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. With the understanding that:
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
Software
Except where otherwise noted, the example programs and other software provided by ENCCS are made available under the OSI-approved MIT license.