OpenACC is a standard for parallel programming on accelerators, such as Nvidia GPUs and Intel Phi. It consists primarily of a set of compiler directives for executing code on the accelerator, in C and Fortran. OpenACC is currently only supported by the PGI compilers installed on OSC systems.
Availability and Restrictions
OpenACC is available to all OSC users. It is supported by the PGI compilers. If you have any questions, please contact OSC Help.
Usage
Set-up
OpenACC support is built into the compilers. There is no separate module to load.
Building With OpenACC
To build a program with OpenACC, use the compiler flag appropriate to your compiler. The correct libraries are included implicitly.
Compiler Family | Flag |
---|---|
PGI | -acc -ta=nvidia -Minfo=accel |
Batch Usage
An OpenACC program will not run without an acelerator present. You need to ensure that your PBS resource request includes GPUs. For example, to run an OpenACC program on Owens, your resource request should look something like this: #PBS -l nodes=1:ppn=28:gpus=2
.
Further Reading
- The OpenACC® website