Computer Science 335
Parallel Processing and High Performance Computing
Fall 2024, Siena College
Lecture 10: MPI Examples
Date: Monday, October 7, 2024
Agenda
- Announcements
- Schedule update: Midterm exam delayed until after October break: Friday, October 25
- Create your accounts on ACCESS CI so I can set up Stampede3 access (see email from last week)
- Submission/grading updates
- Lab 6: Collective Communication Practice [HTML] [PDF] should be done
- Programming Project 4: Collective Communication [HTML] [PDF] due tomorrow
- Example: MPI implementation of Conway's Game of Life
- Uses a distributed data structure: Each process maintains
its own subset of the computational domain, in this case just
some of the rows of the grid. Other processes do not know about
the data on a given process. Only the data that is needed to
compute the next generation, a one-cell overlap (sometimes
called ghost cells or a halo), is exchanged
between neighbors before each iteration.
- When we need to get a global count of some statistic, such as
the count of live cells at the start, we use a reduction.
- The communication of cell data between iterations is done
with two pairs of sends and receives. Here, we use nonblocking
calls, then wait for their completion with the MPI_Waitall
call.
- This example also shows a technique for writing a file when
the intended contents are distributed among a set of processes.
- Programming Project 5: Parallelizing Jacobi Iteration [HTML] [PDF] introduction
- More MPI Examples: parallelizations of matrix-matrix
multiplication (see topic notes)
Terminology
Examples
- mpilife: MPI parallelization of the Conway's
Game of Life simulator
- mpimatmult: Matrix-matrix multiplication parallelized with MPI