New Book: Using OpenMP – The Next Step

Ruud van der Pas from Oracle has co-authored a new book on OpenMP. Entitled “Using OpenMP – The Next Step,” the book was 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 published by MIT Press and available for pre-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.

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.

Ruud van der Pas

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!

Sign up for our insideHPC Newsletter