How to become a parallel programmer by learning the twenty-one essential components of OpenMP.

This book guides readers through the most essential elements of OpenMP—the twenty-one components that most OpenMP programmers use most of the time, known collectively as the “OpenMP Common Core.” Once they have mastered these components, readers with no prior experience writing parallel code will be effective parallel programmers, ready to take on more complex aspects of OpenMP. The authors, drawing on twenty years of experience in teaching OpenMP, introduce material in discrete chunks ordered to support effective learning. OpenMP was created in 1997 to make it as simple as possible for applications programmers to write parallel code; since then, it has grown into a huge and complex system. The OpenMP Common Core goes back to basics, capturing the inherent simplicity of OpenMP.
After introducing the fundamental concepts of parallel computing and history of OpenMP's development, the book covers topics including the core design pattern of parallel computing, the parallel and worksharing-loop constructs, the OpenMP data environment, and tasks. Two chapters on the OpenMP memory model are uniquely valuable for their pedagogic approach. The key for readers is to work through the material, use an OpenMP-enabled compiler, and write programs to experiment with each OpenMP directive or API routine as it is introduced. The book's website, updated continuously, offers a wide assortment of programs and exercises.


The essential guide for writing portable, parallel programs for GPUs using the OpenMP programming model.

Today’s computers are complex, multi-architecture systems: multiple cores in a shared address space, graphics processing units (GPUs), and specialized accelerators. To get the most from these systems, programs must use all these different processors. In Programming Your GPU with OpenMP, Tom Deakin and Timothy Mattson help everyone, from beginners to advanced programmers, learn how to use OpenMP to program a GPU using just a few directives and runtime functions. Then programmers can go further to maximize performance by using CPUs and GPUs in parallel—true heterogeneous programming. And since OpenMP is a portable API, the programs will run on almost any system.

Programming Your GPU with OpenMP shares best practices for writing performance portable programs. Key features include:

  • The most up-to-date APIs for programming GPUs with OpenMP with concepts that transfer to other approaches for GPU programming.
  • Written in a tutorial style that embraces active learning, so that readers can make immediate use of what they learn via provided source code.
  • Builds the OpenMP GPU Common Core to get programmers to serious production-level GPU programming as fast as possible.

Additional features:

  • A reference guide at the end of the book covering all relevant parts of OpenMP 5.2.
  • An online repository containing source code for the example programs from the book—provided in all languages currently supported by OpenMP: C, C++, and Fortran.
  • Tutorial videos and lecture slides.