Introduction to Parallel and Distributed Programming using N-Body Simulations - Van Craen, Alexander; Breyer, Marcel; Pfluger, Dirk (SC24-W: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis, 2024)
This paper describes how we use n-body simulations as an interesting and visually compelling way to teach efficient, parallel, and distributed programming. Our first course focuses on bachelor students introducing them to algorithmic complexities and their implications in real-world problems and state-of-the-art tools like Git, remote development, or C++, by simulating the collision of two galaxies. This project teaches the mapping of mathematical functions into code, efficient implementations, and the pitfalls around complexity and scaling. Our second course targets master students introducing them to intra- and inter-node parallelization. Here, the students simulate our solar system using OpenMP and MPI. The master students further deepen their knowledge of parallelization and scientific computing by choosing custom projects like simulating water molecules or implementing an interactive live visualization using GPUs.Our courses are structured such that they can easily be adapted by other instructors. All our material is publicly available at https://github.com/orgs/SCTeaching-NBody.