In an era of multicore processors coupled with manycore accelerators in all kinds of devices from smartphones all the way to supercomputers, it is important to train current and future computational scientists of all domains the art of parallel programming. More and more colleges and universities have begun to integrate this as a mandatory course into their undergraduate computer science programs and also as an offer in the graduate/Ph.D. programs in computational science domains. In a time of rapidly evolving processor and accelerator architectures, the training material should have a longevity that lasts beyond next generation of hardware. As such more abstract programming models such as directive-based parallelization approaches offer both platform and performance portability and at the same time they also convey all the important concepts of parallel programming that can be easily transferred to other paradigms.
One such directive-based programming model is OpenACC, which has rapidly gained momentum over the past few years among scientific application users. OpenACC now accelerates ANSYS Fluent (CFD) and Gaussian (Quantum Chemistry) and VASP (Material Science), which are among the top 10 HPC applications, as well as selected ORNL Center for Accelerated Application Readiness (CAAR) codes to be run on the future CORAL Supercomputer: GTC (Physics), XGC (Physics), LSDalton (Quantum Chemistry), ACME(CWO), and FLASH (Astrophysics).
The book OpenACC for Programmers: Concepts and Strategies (published by Addison-Wesley Professional, September 20, 2017; edited by Sunita Chandrasekaran and Guido Juckeland) provides comprehensive and practical overviews of using the parallel programming model for heterogeneous computing systems. This book integrates contributions from 19 leading parallel programming experts from academia, public research organizations and industry. The text is written in a modular manner in a way that instructors can pick a chapter or chapters of their choice to include into their existing parallel programming curriculum. On the other hand, the book is comprehensive enough to be used for a tutorial or bootcamp on OpenACC. The chapters are stacked in a way that helps the reader to incrementally master the art of parallel programming. The editors have also built a GitHub course that is populated with example codes and chapters’ exercise solutions enabling instructors to create homework assignments.
The book begins its narrative on the basic concepts of OpenACC and the different types of parallelism exposed by the programming model in order to achieve performance without losing portability. One of the most important topics in parallel programming is profiling. How do you identify hot spots? How do you identify performance bottlenecks? Chapter 3 explains it all. This chapter demonstrates use of performance analysis tools, profilers and debugging tools such as the Nvidia profiler, Score-P & Vampir, TAU and Allinea’s DDT with nice visualization pictures for easy takeaways.
Are you new to OpenACC and keen to learn how to write your first program? Chapter 4 helps you take baby steps on how to build your first OpenACC program in both C and Fortran. This is a go-to chapter for a beginner learning to build and compile his/her code with the most commonly used OpenACC directives. The chapter also offers tips on how one can improve the code, serving as a mini best practice guide.
Do you want to know more about what happens under the hood? Look for Chapter 5 to read about what a compiler can and cannot do. The chapter concludes with some intriguing questions that could easily be converted into a class assignment or quiz.
Often, the scientific developers are looking for ways to incrementally improve performance. This leads to some fine tuning of the directives added to the code. Learning about some of the best practices can be quite useful in such scenario. Chapter 6 offers several do’s and don’t tips to the developers that often comes handy.
The book also has case studies demonstrating the usability of OpenACC on kernel as well as application benchmarks. Chapter 7 presents realistic examples where the authors from the Oak Ridge National Lab talk about a cosmology application, HACC, which is part of the CORAL benchmark suite. The authors discuss the performance portability of OpenACC directives across architectures.
To fulfill the goal of a general parallel programming training, the author of Chapter 8 highlights key features of several other approaches such as CUDA, OpenMP, OpenCL, C++ AMP, RAJA, Kokkos, TBB among others. This will give the readers a good understanding of additional parallel programming approaches and the mapping of the learned OpenACC constructs to them.
Are you looking to interoperate OpenACC with native or low-level APIs to program heterogeneous systems? Or interested to know more about how to program multiple devices available in order to maximize performance? Learn more in advanced chapters 9 and 10. Such discussions are very timely especially when we have supercomputers such as Summit where a single node consists of six Nvidia V100 cards per two Power9 CPUs.
Last but not the least, Chapters 11 and 12 can offer students and readers food for thought. A handful of authors who have provided support for OpenACC in research compilers such as OpenARC, XcalableACC, OpenUH and Sunway OpenACC narrate their experiences and share novel ideas of language extensions and optimizations. These ideas can help brainstorm how to enhance the language feature set of OpenACC, its compiler and runtime implementations for hardware architectures that are rapidly evolving.
With all this knowledge the readers are now well capable of developing their own parallel programs and, thus, fully utilizing all resources in a modern (heterogeneous) computing platform. In combination with the exercise questions at the end of each chapter, their solutions and code examples on GitHub, the book caters not only to both the “classical” educators and their students, but also to the domain scientists and practitioners. Parallel programming is such a fundamental skill that has grown beyond the traditional HPC community. High level programming approaches such as OpenACC provide a manageable learning curve for novices and this book is designed to be a guide on this journey.
Sunita Chandrasekaran is an assistant professor in Computer and Information Sciences and an affiliated faculty with the Center for Bioinformatics & Computational Biology (CBCB) at the University of Delaware. She has coauthored chapters in the books Programming Models for Parallel Computing, published by MIT Press, and Parallel Programming with OpenACC, published by Elsevier, 2016. Her research areas include exploring high-level programming models and its language extensions, building compiler and runtime implementations and validating and verifying implementations and their conformance to standard specifications. She is a member of the OpenMP, OpenACC, and SPEC HPG communities. Dr. Chandrasekaran earned her PhD in computer science engineering from Nanyang Technological University (NTU), Singapore, for creating a high-level software stacks for FPGAs.
Guido Juckeland founded the Computational Science Group at Helmholtz-Zentrum Dresden-Rossendorf (HZDR), Germany. He is responsible for designing and implementing end-to-end Research IT-workflows together with scientists and IT experts at HZDR. His research focuses on better usability and programmability for hardware accelerators and application performance monitoring as well as optimization. He is the vice-chair of the SPEC High Performance Group (HPG), an active member of the OpenACC technical and marketing committees, and also contributes to the OpenMP tools working group. Guido earned his PhD in computer science from Technische Universität Dresden, Germany, for his work on trace-based performance analysis for hardware accelerators.