Link to this document's Jupyter Notebook

In order to successfully complete this assignment you need to participate both individually and in groups during class. If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class on Monday March 22. If you are attending asynchronously, turn in your assignment using D2L no later than _11:59pm on Monday March 22.


In-Class Assignment: The Message Passing Interface (MPI)

Picture of kids passing a note in class. This is intended to motivate the message passing aspect of MPI

Image from: https://www.appianimosaic.com/

Agenda for today's class (70 minutes)

  1. (20 minutes) Pre class Review
  2. (20 minutes) MPI Code Review
  3. (30 minutes) Rumor Mill Example

1. Pre class Review

0321--MPI_Introduction_pre-class-assignment


2. MPI Code Review

As a class lets explore some MPI code.

QUESTION: What are the different inputs to the MPI_Send and MPI_Recv commands? What do we think they do?

Put your observations here.

QUESTION: What other MPI related commands did you find in this example. What do these commands do?

Put your observations here.


3. Rumor Mill Example

Consider the code put in the Rumor folder of the CMSE401 git repository. This code uses agent based models to pass "rumors" around a grid of points. In the next couple of classes we are going to review the code and see if we can modify it to use MPI.

Specifically we are going to try and split the simulation into separate grids that share boarders. Each node only needs to keep track of the rumors in its own grid. MPI Send/Recv messages should be used to pass the "boundary" vectors of each grid to it's neighboring grids after every iteration.

DO THIS: In your groups, go though the provided code and see if it makes sense. Get it to compile and run on the HPCC and do a few baseline benchmarks. See if you can figure out an easy way to split up the work load between computers.


Congratulations, we're done!

If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class. If you are attending asynchronously, turn in your assignment using D2L.

Course Resources:

Written by Dr. Dirk Colbry, Michigan State University Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.