Blog post by: Ruud van der Pas, Oracle.
With great pleasure I announce the availability of the book “Using OpenMP – The Next Step“.
This book is written together with Eric Stotzer and Christian Terboven. It covers the OpenMP 4.5 specifications, with a focus on the practical usage of the language features and constructs. The book is available from MIT Press and available for order through the MIT Press web site, or on Amazon.
We start where the specifications end and explain the rationale behind the features. In particular the functionality and how a feature may be used in an application. This is why there are many code fragments, and also fully worked examples, demonstrating the use. There is less emphasis on the formal syntax. This can be found in the specifications on the OpenMP web site. Our practical approach is reflected in the statistics. There are 115 code fragments, 34 drawings, and 72 boxes with syntax descriptions.
The book starts with an augmented recap of the 2.5 specifications. This has been included as a convenience, because it is assumed that the reader is familiar with OpenMP 2.5. This chapter is however not just a summary. In several places, a heads up about what is to come in subsequent chapters is given and we recommend to read it, even if one is familiar with the features already.
Chapter 2 covers all of the 4.5 specifications, with the exception of four major features: tasking, thread affinity, SIMD, and heterogeneous systems. These all have their own dedicated chapter. Chapter 2 starts with the enhancements to existing constructs and features, introduced since OpenMP 2.5. This is followed by new functionality, not available in 2.5.
Chapter 3 is about tasking and starts with four examples. They are rather different and go into quite some detail. By the time the reader has finished these, the remainder of this chapter should be easy to follow. This is where a more formal coverage of tasking can be found, but most of this has been demonstrated in the various examples already.
Chapter 4 has a lengthy coverage of thread affinity. This is an important feature to tune the performance on a cc-NUMA system. Since even two socket systems have this kind of memory architecture, thread affinity is relevant to many OpenMP users. The concepts behind thread affinity in OpenMP are introduced and explained in great detail, followed by many examples how to control thread placement.
Chapter 5 is dedicated to SIMD, which stands for “Single Instruction Multiple Data”. It is the present day equivalent of vectorization. It is hardware parallelism at the instruction level, where one instruction performs the same operation on multiple data elements simultaneously. Through many examples it is illustrated how to exploit this feature using the appropriate OpenMP constructs and clauses.
Chapter 6 has a very comprehensive coverage of the support for heterogeneous systems, typically an accelerator system connected to a host system. The host executes the OpenMP application, but through the appropriate constructs, work is offloaded to the accelerator system and the results are made available to the host system. After an introduction of the terminology and the extended memory model, the various features to offload data and computations are presented. This is illustrated with many code fragments.
Chapter 7 outlines several proposed additions and changes that are expected in the upcoming release of the specifications.
The book concludes with a glossary, meant as a convenience to help explain the terminology used throughout the various chapters.
We certainly enjoyed writing this book and unravel the specifications. We hope our readers find it useful and that it helps them to become a true OpenMP Jedi master!
The book is available from:
About the Authors
- Ruud van der Pas is Distinguished Engineer in the SPARC Processor Organization at Oracle and coauthor of Using OpenMP: Portable Shared Memory Parallel Programming.
- Eric Stotzer is a Distinguished Member Technical Staff at Texas Instruments.
- Christian Terboven is the HPC Group Manager at RWTH Aachen University, Germany. He has been a member of the OpenMP Language Committee since 2006 and serves as the Chair of the Affinity subcommittee.
- “OpenMP has grown over its twenty-plus-year history to include vector units, NUMA, irregular parallelism, and GPUs, but books to help you learn OpenMP have not kept pace—until the excellent team of van der Pas, Stotzer, and Terboven wrote this one. If you want to update your knowledge of OpenMP and move beyond parallel loops and basic multithreading, this is the book for you.”
Tim Mattson, Senior Principal Engineer, Intel; author of Patterns for Parallel Programming
- “This book is easy to read and well written. It has many practical examples and is a must have for everyone interested in making the best use of the OpenMP language.”
– Michael Klemm, CEO of the OpenMP Architecture Review Board