You are here

SC17-002: Advanced Parallel Programming in C++

Patrick Diehl, Louisiana State University 
Hartmut Kaiser, Louisiana State University 
Steven R. Brandt, Louisiana State University
 
Many computational engineering codes are based-on the C++ programming language, however, many of these codes do not utilize modern C++ features, especially the features for parallel computations provided by the recent C++ 17 standard. These features can greatly simplify parallel computations using multiple cores.

In this tutorial, participants will learn how to use C++17 functions and objects to write straightforward yet fully parallized code without the need of external tools such as OpenMP. Since the Python programming language is more commonly known by most potential attendees, the team will use Jupyter Notebooks with the Cling extension for C++ to walk attendees step by step through creating a fully parallelized one-dimensional finite element code. Thus, attendees can use a programming environment they are familiar with. Because standard compiler distributions often lack complete support for this feature, our examples will use the HPX framework.

In the second half of the tutorial, the team will demonstrate how users can employ nearly the same syntax to distribute these codes across a cluster. We will use the HPX library to provide the support needed to manage a distributed application.

The example code, the solutions, and the lecture slides will be available on GitHub, so attendees can use them after the short course.

After the short course, attendees will have learned about modern C++ features and how to run a parallel and distributed one-dimensional finite element solver using the mechanics built-in in the C++ 17 and upcoming C++ 20 standard.
  • Introduction to C++17 and C++20, Hartmut Kaiser
  • Q&A
  • Break
  • Introduction to asynchronous programming and the parallel algorithms, Patrick Diehl
  • Break
  • Exercise 1, Parallel implementation of the 2D finite difference scheme
  • Break
  • Introduction to distributed programming, Steve Brandt