World Library  
Flag as Inappropriate
Email this Article


Stable release 2.0 / June 2013
Written in C, C++, and Fortran
Operating system Cross-platform
Platform Cross-platform
Type API

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.[1]

Like 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.[2] Like OpenMP 4.0 and newer, code can be started on both the CPU and GPU.

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.[3][4] These efforts resulted in a technical report[5] 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.[6]

At ISC’12 OpenACC was demonstrated to work on Nvidia, AMD and Intel accelerators, without performance data.[7]

In November 12, 2012, at the SC12 conference, a draft of the OpenACC version 2.0 specification was presented.[8] 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).


  • Compiler support 1
  • Usage 2
    • Directives 2.1
    • Runtime API 2.2
  • See also 3
  • References 4
  • External links 5

Compiler support

Support of OpenACC is available in commercial compilers from PGI (from version 12.6), Cray, and CAPS.[7][9][10]

OpenUH[11] is an Open64 based open source OpenACC compiler supporting C and FORTRAN, developed by HPCTools group from University of Houston.

The OpenARC compiler[12] is an open source, C language compiler developed over the past several years at Oak Ridge National Laboratory to fully support all features in the OpenACC 1.0 specification.

An open source compiler, accULL, is also developed by the University of La Laguna (C language only).[13]

GNU GCC is also working on adding OpenACC support.[14]


In a way similar to OpenMP 3.x on homogeneous system or the earlier OpenHMPP,[15] the primary mode of programming in OpenACC is directives.[16] 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;[17] and then call acc_init() function.


OpenACC defines an extensive list of pragmas (directives),[2] for example:

 #pragma acc parallel
 #pragma acc kernels

Both are used to define parallel computation kernels to be executed on the accelerator, using distinct semantics[18][19]

 #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 parallel or kernels region.

 #pragma acc cache
 #pragma acc update
 #pragma acc declare
 #pragma acc wait

Runtime API

There are some runtime API functions defined too: acc_get_num_devices(), acc_set_device_type(), acc_get_device_type(), acc_set_device_num(), acc_get_device_num(), acc_async_test(), acc_async_test_all(), acc_async_wait(), acc_async_wait_all(), acc_init(), acc_shutdown(), acc_on_device(), acc_malloc(), acc_free().

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).

See also


  1. ^ "Nvidia, Cray, PGI, and CAPS launch ‘OpenACC’ programming standard for parallel computing". The Inquirer. 4 November 2011. 
  2. ^ a b "OpenACC standard version 2.0". Retrieved 14 January 2014. 
  3. ^ "How does the OpenACC API relate to the OpenMP API?". Retrieved 14 January 2014. 
  4. ^ "How did the OpenACC specifications originate?". Retrieved 14 January 2014. 
  5. ^ "The OpenMP Consortium Releases First Technical Report". 5 November 2012. Retrieved 14 January 2014. 
  6. ^ "OpenMP at SC12". 29 August 2012. Retrieved 14 January 2014. 
  7. ^ a b "OpenACC Group Reports Expanding Support for Accelerator Programming Standard". HPCwire. 20 June 2012. Retrieved 14 January 2014. 
  8. ^ "OpenACC Version 2.0 Posted for Comment". 12 November 2012. Retrieved 14 January 2014. 
  9. ^ "OpenACC Standard to Help Developers to Take Advantage of GPU Compute Accelerators". Xbit laboratories. 16 November 2011. Retrieved 14 January 2014. 
  10. ^ "CAPS Announcing Full Support for OpenACC 2.0 in its Compilers". HPCwire. 14 November 2013. Retrieved 14 January 2014. 
  11. ^ "OpenUH Compiler". Retrieved 4 March 2014. }
  12. ^ "OpenARC Compiler". Retrieved 4 November 2014. 
  13. ^ "accULL The OpenACC research implementation". Retrieved 14 January 2014. 
  14. ^ Gavrin, Evgeny (26 September 2013). "OpenACC branch [openacc-1_0-branch"]. gcc mailing list. Retrieved 14 January 2014.
  15. ^ Dolbeau, Romain; Bihan, Stéphane; Bodin, François (4 October 2007). "HMPP: A Hybrid Multi-core Parallel Programming Environment". Workshop on General Purpose Processing on Graphics Processing Units. Retrieved 14 January 2014. 
  16. ^ "Easy GPU Parallelism with OpenACC". Dr.Dobb's. 11 June 2012. Retrieved 14 January 2014. 
  17. ^ "OpenACC API QuickReference Card, version 1.0". NVidia. November 2011. Retrieved 14 January 2014. 
  18. ^ "OpenACC Kernels and Parallel Constructs". PGI insider. August 2012. Retrieved 14 January 2014. 
  19. ^ "OpenACC parallel section VS kernels". CAPS entreprise Knowledge Base. 3 January 2013. Retrieved 14 January 2014. 

External links

  • Usage example from NVIDIA: part1, part2
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.