Skip to main content

Towards Generic Parallel Programming in Computer Science Education with Kokkos...

by Jan Ciesko, David Poliakoff, Daisy Hollman, Christian Trott, Damien T Lebrun-grandie
Publication Type
Conference Paper
Journal Name
2020 IEEE/ACM Workshop on Education for High-Performance Computing (EduHPC)
Book Title
2020 IEEE/ACM Workshop on Education for High-Performance Computing (EduHPC)
Publication Date
Page Numbers
35 to 42
Publisher Location
District of Columbia, United States of America
Conference Name
SC20 - The International Conference for High Performance Computing, Networking, Storage, and Analysis
Conference Location
Virtual, Georgia, United States of America
Conference Sponsor
Conference Date

Parallel patterns, views, and spaces are promising abstractions to capture the programmer's intent as well as the contextual information that can be used by an underlying runtime to efficiently map software to parallel hardware. These abstractions can be valuable in cases where an algorithm must accommodate requirements of code and performance portability across hardware architectures and vendor programming models. Kokkos is a parallel programming model for host- and accelerator architectures that relies on these abstractions and targets these requirements. It consists of a pure C++ interface, a specification, and a programming library. The programming library exposes patterns and types and maps them to an underlying abstract machine model. The abstract machine model offers a generic view of parallel hardware. While Kokkos is gaining popularity in large-scale HPC applications at some DOE laboratories, we believe that the implemented concepts are of interest to a broader audience including academia as they may contribute to a generic, vendor, and architecture-independent education of parallel programming. In this work, we give an insight into the design considerations of this programming model and list important abstractions. Further, we document best practices obtained from giving virtual classes on Kokkos and give pointers to resources that the reader may consider valuable for a lecture on generic parallel programming for students with preexisting knowledge on this matter.