OpenACC (for open accelerators) is a programming standard for parallel computing developed by Cray, CAPS, Nvidia and PGI. The standard is designed to simplify parallel programming of heterogeneous CPU/GPU systems.
2.7 / November 2018
|Written in||C, C++, and Fortran|
As in OpenMP, the programmer can annotate C, C++ and Fortran source code to identify the areas that should be accelerated using compiler directives and additional functions. Like OpenMP 4.0 and newer, OpenACC can target both the CPU and GPU architectures and launch computational code on them.
OpenACC members have worked as members of the OpenMP standard group to merge into OpenMP specification to create a common specification which extends OpenMP to support accelerators in a future release of OpenMP. These efforts resulted in a technical report for comment and discussion timed to include the annual Supercomputing Conference (November 2012, Salt Lake City) and to address non-Nvidia accelerator support with input from hardware vendors who participate in OpenMP.
In November 12, 2012, at the SC12 conference, a draft of the OpenACC version 2.0 specification was presented. New suggested capabilities include new controls over data movement (such as better handling of unstructured data and improvements in support for non-contiguous memory), and support for explicit function calls and separate compilation (allowing the creation and reuse of libraries of accelerated code). OpenACC 2.0 was officially released in June 2013.
On April 3, 2019 John Levesque (the director of Cray Supercomputing Center of Excellence at Cray) announced that Cray are ending support for OpenACC in CCE/9.0.
OpenARC is an open source C compiler developed at Oak Ridge National Laboratory to support all features in the OpenACC 1.0 specification. An experimental open source compiler, accULL, is developed by the University of La Laguna (C language only).
Omni Compiler is an open source compiler developed at HPCS Laboratory. of University of Tsukuba and Programming Environment Research Team of RIKEN Center for Computational Science, Japan, supported OpenACC, XcalableMP and XcalableACC combining XcalableMP and OpenACC.
IPMACC is an open source C compiler developed by University of Victoria that translates OpenACC to CUDA, OpenCL, and ISPC. Currently, only following directives are supported: data, kernels, loop, and cache.
GCC support for OpenACC was slow in coming. A GPU-targeting implementation from Samsung was announced in September 2013; this translated OpenACC 1.1-annotated code to OpenCL. The announcement of a "real" implementation followed two months later, this time from NVIDIA and based on OpenACC 2.0. This sparked some controversy, as the implementation would only target NVIDIA's own PTX assembly language, for which no open source assembler or runtime was available. Experimental support for OpenACC/PTX did end up in GCC as of version 5.1. GCC6 and GCC7 release series include a much improved implementation of the OpenACC 2.0a specification. GCC 9.1 offers nearly complete OpenACC 2.5 support.
In a way similar to OpenMP 3.x on homogeneous system or the earlier OpenHMPP, the primary mode of programming in OpenACC is directives. The specifications also include a runtime library defining several support functions. To exploit them, user should include "openacc.h" in C or "openacc_lib.h" in Fortran; and then call acc_init() function.
#pragma acc parallel #pragma acc kernels
#pragma acc data
Is the main directive to define and copy data to and from the accelerator.
#pragma acc loop
Is used to define the type of parallelism in a
#pragma acc cache #pragma acc update #pragma acc declare #pragma acc wait
There are some runtime API functions defined too:
OpenACC generally takes care of work organisation for the target device however this can be overridden through the use of gangs and workers. A gang consists of workers and operates over a number of processing elements (as with a workgroup in OpenCL).
- "Nvidia, Cray, PGI, and CAPS launch 'OpenACC' programming standard for parallel computing". The Inquirer. 4 November 2011.
- "OpenACC standard version 2.5" (PDF). OpenACC.org. Retrieved 2 June 2017.
- "How does the OpenACC API relate to the OpenMP API?". OpenACC.org. Retrieved 14 January 2014.
- "How did the OpenACC specifications originate?". OpenACC.org. Retrieved 14 January 2014.
- "The OpenMP Consortium Releases First Technical Report". OpenMP.org. 5 November 2012. Retrieved 14 January 2014.
- "OpenMP at SC12". OpenMP.org. 29 August 2012. Retrieved 14 January 2014.
- "OpenACC Group Reports Expanding Support for Accelerator Programming Standard". HPCwire. 20 June 2012. Archived from the original on 23 June 2012. Retrieved 14 January 2014.
- "OpenACC Version 2.0 Posted for Comment". OpenACC.org. 12 November 2012. Retrieved 14 January 2014.
- "OpenACC 2.0 Spec | www.openacc.org". www.openacc.org. Archived from the original on 2016-04-04. Retrieved 2016-03-23.
- "OpenACC Standards Group Announces Release of the 2.5 Specification; Member Vendors Add Support for ARM & x86 as Parallel Devices | www.openacc.org". www.openacc.org. Archived from the original on 2016-07-26. Retrieved 2016-03-22.
- "What's new in OpenACC 2.6? | OpenACC". www.openacc.org. Retrieved 2018-05-01.
- "What's new in OpenACC 2.7! | OpenACC". www.openacc.org. Retrieved 2019-01-07.
- "Cray's views on #OpenACC vs #OpenMP". Retrieved 14 May 2019.
- "OpenACC Standard to Help Developers to Take Advantage of GPU Compute Accelerators". Xbit laboratories. 16 November 2011. Archived from the original on 16 January 2014. Retrieved 14 January 2014.
- "OpenUH Compiler". Archived from the original on 25 January 2014. Retrieved 4 March 2014.
- "OpenARC Compiler". Retrieved 4 November 2014.
- Larabel, Michael (30 September 2013). "GCC Support Published For OpenACC On The GPU". Phoronix.
- "accULL The OpenACC research implementation". Retrieved 14 January 2014.
- "Omni Compiler". omni-compiler.org. Retrieved 2019-11-18.
- Omni Compiler for C and Fortran programs with XcalableMP and OpenACC directives: omni-compiler/omni-compiler, omni-compiler, 2019-10-17, retrieved 2019-11-17
- "IPMACC Compiler". Retrieved 31 January 2017.
- Larabel, Michael (4 December 2012). "OpenACC Still Not Loved By Open Compilers". Phoronix.
- Larabel, Michael (14 November 2013). "OpenACC 2.0 With GPU Support Coming To GCC". Phoronix.
- Larabel, Michael (15 November 2013). "NVIDIA, Mentor Graphics May Harm GCC". Phoronix.
- Larabel, Michael (21 November 2013). "In-Fighting Continues Over OpenACC In GCC". Phoronix.
- Schwinge, Thomas (15 January 2015). "Merge current set of OpenACC changes from gomp-4_0-branch". gcc (Mailing list). gcc.gnu.org. Retrieved 15 January 2015.
- Jelinek, Jakub (3 May 2019). "GCC 9.1 Released". LWN.net.
- "Easy GPU Parallelism with OpenACC". Dr.Dobb's. 11 June 2012. Retrieved 14 January 2014.
- "OpenACC API QuickReference Card, version 1.0" (PDF). NVidia. November 2011. Retrieved 14 January 2014.
- "OpenACC standard version 2.0" (PDF). OpenACC.org. Retrieved 14 January 2014.
- "OpenACC Kernels and Parallel Constructs". PGI insider. August 2012. Retrieved 14 January 2014.
- "OpenACC parallel section VS kernels". CAPS entreprise Knowledge Base. 3 January 2013. Archived from the original on 16 January 2014. Retrieved 14 January 2014.