CS 4960-01 Homework 8

Due: Monday, November 3rd, 2008 10:45am

This homework is like HW5, but using MPI instead of bmsg.c. Also, it generates color pictures, where the color shows the process that generated each line in the output.

Start with mb_col.c from openmp_ex.zip.

Part 1

Port mb_col.c to MPI. Interleave the line assignments among processes (like part 2 of HW5). Your program should send all computed lines of the image to a “root” process that prints the output.

Use just the point-to-point functions of MPI, such as MPI_Send (and its variants) or MPI_Recv (and variants).

Your program should work for any number of processes up to 6 (since there are only 6 colors in mb_col.c).

Handin the solution for this part as mb_col_mpi.c.

Part 2

Convert your MPI program to use a work queue instead of interleaved line assignments. It's ok if one process just manages the queue and doesn't compute rows of its own.

As in part 1, stick to the MPI point-to-point functions, though you should use some non-blocking operations, such as MPI_Irecv.

Handin the solution for this part as mb_col_mpi_work.c.


Last update: Monday, December 1st, 2008
mflatt@cs.utah.edu