Parallel Computing in the Computer Science Curriculum > Modules > Pandemic Exemplar

Pandemic Exemplar

Yu Zhao and Libby Shoop, Macalester College

Aaron Weeden, Shodor Fuundation

Author Profile

Summary

In this module we present a typical real-world example from epidemiology, where the spread of a pandemic infectious disease is modeled using monte carlo simulation (random movements that simulate the real-world actions of people). Starting from a given amount of infected people, how a disease spreads is modeled over a user-provided length of time. We start with the sequential version of this classic iterative monte carlo solution, then show how the code can be parallelized. Students can run the code and examine performance of sequential and parallel versions.

Learning Goals

Context for Use

This module presents C code that has been decomposed into many small functions in separate files and makes use of data structures to hold simulation parameters and computed values. Students should have some familiarity with C programming. The code and how the simulation is carried out is described in detail, so most students with some coding experience should be able to grasp it. A prior working knowledge of OpenMP is necessary (see the Parallel Patternlets module in this collection to help with that).

Description and Teaching Materials

Online teaching module that you can use with your students.

latex tarball of this module, including a pdf file.

MS Word docx version of this module.

Teaching Notes and Tips

You will need multicore hardware with an OpenMP compiler to run the parallel examples.

Assessment

Suggested homework problems and additional activities are in the works.

See more Modules »



Comment? Start the discussion about Pandemic Exemplar