Parallelizing a 1-Dim Nagel-Schreckenberg Traffic Model
Abstract
The Nagel-Schreckenberg model is a stochastic one-dimensional traffic model. In this assignment, we guide students through the process of implementing a shared-memory parallel and reproducible version of an existing serial code that implements this model, and to analyze its scaling behavior. One of the key elements in this traffic model is the presence of randomness, without which it would lack realistic phenomena such as traffic jams. Its implementation thus requires techniques associated with Monte Carlo simulations and pseudo-random number generation (PRNG). PRNGs are notoriously tricky to deal with in parallel when combined with the requirement of reproducibility. This assignment was created for the graduate course PHY1610 Scientific Computing for Physicists at the University of Toronto, which had its origin in the training program of the SciNet HPC Consortium, and is also very suitable for other scientific disciplines. Several variations of the assignment have been used over the years.
- Publication:
-
arXiv e-prints
- Pub Date:
- September 2023
- DOI:
- 10.48550/arXiv.2309.14311
- arXiv:
- arXiv:2309.14311
- Bibcode:
- 2023arXiv230914311V
- Keywords:
-
- Computer Science - Distributed;
- Parallel;
- and Cluster Computing;
- Computer Science - Computers and Society;
- Mathematics - Numerical Analysis
- E-Print:
- To be presented at the "EduHPC-23: Workshop on Education for High-Performance Computing" to be held in conjunction with SC23. Starter code and handout can be found in the "complimentary" material section or the GitHub repository https://github.com/Practical-Scientific-and-HPC-Computing/Traffic_EduHPC-23