Using OpenMP-The Next Step: Affinity, Accelerators, Tasking, and SIMD (Scientific and Engineering Computation)
T**7
The definitive book for OpenMP parallel programmers
This is the sequel to Using OpenMP: Portable Shared Memory Parallel Programming from 2007, the original definitive OpenMP book. This is a continuation more than a replacement, and is meant to be a companion volume, with most of the book focused on the many important and significant new features available in the latest OpenMP version 4.5. While I have both books, and the original is certainly worth owning, this one can be used alone, since the first chapter reviews most of the important material from the first book. In fact, I found the new first chapter easier to read and use than the original book. If you are new to parallel programming, however, you may want to start with the original (which covered OpenMP 2.5).For simple parallel programs, older versions of OpenMP such as 2.5 sufficed. However, there are some essential new features that even a moderately complex parallel program will make good use of. This book provides a very good exposition of these features, including OpenMP syntax, tips, and sample code. For example, I need nested threading for a particular project I am working on, and need a unique thread identifier for any thread at any level. The book provides a C++ method that can do that - although I did need to modify it as my code is a little more complex than it will handle. While this book can be used by Fortran programmers to understand OpenMP, all the examples are now in C++, but Fortran is mentioned from time to time when there are notable differences.I have been using OpenMP for several years with gcc on linux machines, and have been developing parallel code for over 30. I find that OpenMP provides an easy way to add parallel threads to existing code, and can be used by C++ and Fortran programmers to write new parallel code as well, though there are other options to consider (e.g. MPI). With the new features, though, OpenMP is becoming more and more capable and versatile with each new version.This book is useful as a reference but is also quite readable to get up to speed on the latest OpenMP features. The second chapter is devoted to many new features, including improved support for nested threading. The next chapters cover Tasking, Thread Affinity, SIMD programming, and Heterogeneous Architectures. Most parallel programmers won't deal with all of these, but it is worth at least knowing a little about each in case you ever need them. Personally, I found the information on tasking and nested threading, as well as the overview of new features, alone easily worth the price of this book.Being the first edition, a few things could have been a little more clear and required a several readings to understand. There were a few minor errors as well. (If you use their thread ID algorithm, note that Gtid on the bottom of page 80 should be Ltid.) Overall, though, the book is well laid out and understandable.If you are an experienced OpenMP programmer wanting to better understand all that the newer OpenMP versions offer, or are just starting out in parallel programming and expect to use OpenMP, this is an important book to have on your desk.
Trustpilot
2 months ago
3 days ago