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.
OpenACC is available to all OSC users. It is supported by the PGI compilers. If you have any questions, please contact OSC Help.
OpenACC support is built into the compilers. There is no separate module to load.
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 |
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
.