The purpose of this chapter is to introduce the reader to OpenACC and demonstrate how it can be used to write portable parallel programs that can run on multicore CPUs and accelerators like GPUs. Example programs will show the reader how to compile and run on both CPUs and GPUs.
At the end of this chapter the reader will have a basic understanding of
• How to create, build and run OpenACC applications
• Three rules of high-performance OpenACC programming
• The basic concepts of data-parallel and task-parallel programming
• An understanding of Big-O notation and Amdahl’s law
• Race conditions, atomic operations, ...