OpenMP と OpenACC の関係

ヘテロジニアス・コンピューティング向けのプログラミング環境として、OpenMP 4.0からdeviceコンストラクトが導入され、OpenACCとよく似た処理を記述できるようになった。

とはいえ、OpenMP/OpenACCが目指す方向性は微妙に異なっている。

http://www.nextplatform.com/2015/11/30/is-openacc-the-best-thing-to-happen-to-openmp/
> “The real issue is which one, OpenACC or OpenMP, solves the issue for the users,” explains Wolfe. “OpenMP is richer and has more features than OpenACC, we make no apologies about that. OpenACC is targeting scalable parallelism, OpenMP is targeting more general parallelism including things like tasks, which in some senses are inherently not scalable. OpenMP has a lot more synchronization primitives, and if you are talking about scalable parallelism, that is just a way to slow your program down. The important differences are performance portability – and at SC15 you heard that it is either important or impossible – and we are saying that it is not only important and possible, but that we are demonstrating this today.”

（Wolfe氏の立場：technical chair for OpenACC）

![OpenACC vs OpenMP](http://www.nextplatform.com/wp-content/uploads/2015/11/openacc-versus-openmp.jpg)
(http://www.nextplatform.com/wp-content/uploads/2015/11/openacc-versus-openmp.jpg)

# OpenMP公式
http://openmp.org/openmp-faq.html#OpenACC
> OMPAPI.Relatives.01 How does OpenMP relate to OpenACC ?
>
> OpenMP and OpenACC are actively merging their specification while continuing to evolve. A first step at merging has been made with the release of OpenMP 4.0. OpenACC implementations can be considered to be a beta test of the OpenMP accelerator specification. They give early implementation experience.
> OpenACC has been created and implemented by several members of the OpenMP ARB in order to address their immediate customer needs. These members are NVIDIA, PGI, Cray, and CAPS.


# OpenACC公式
http://www.openacc.org/content/what-does-it-take-port-application-openacc-versus-openmp
> What does it take port application OpenACC versus OpenMP
>
> OpenACC and OpenMP require a similar approach to parallelizing code, so no developer investment is wasted.
> OpenACC allows the developer to express the parallelism in the code while relying on an OpenACC compiler to map that parallelism to the hardware. This enables the developer to write parallel code that is performance portable to any architecture.
> OpenMP relies on the developer to explicitly parallelize their code, which makes OpenMP simpler for a compiler to implement but more difficult to make portable to different architectures.

# 関連資料
- (PDF) [OpenMP and OpenACC a Comparison](http://on-demand.gputechconf.com/gtc/2014/presentations/S4708-openmp-openacc-comparison.pdf)
- (PDF) [Comparing OpenACC and OpenMP Performance and Programmability](http://on-demand.gputechconf.com/gtc/2015/presentation/S5196-Jeff-Larkin.pdf)
- (PDF) [OpenACC 2.0 
versus 
OpenMP 4.0 device constructs](http://on-demand.gputechconf.com/gtc/2013/webinar/gtc-express-webinar-openacc-vs-openmp.pdf)
- (PDF) [Comparing OpenACC 2.5 and OpenMP 4.1](http://openmpcon.org/wp-content/uploads/openmpcon2015-james-beyer-comparison.pdf)
- [GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5 ](http://www.slideshare.net/jefflarkin/gtc16-s6410-comparing-openacc-25-and-openmp-45)