CS735/CS835 Programming Assignment 3 (due Sun Oct 26)


This program concerns the parallel implementation of matrix multiplication (C = A x B) using message passing on the Galaxy cluster.

Write an NXS program to parallelize the serial program (matrix0.c) found in ~cs735/public/mm on agate.cs.unh.edu.

This serial program includes code for initializing the matrices to be multiplied and code for computing a simple checksum for checking the results. The performance of these two steps is not important. You are only responsible for improving the performance of the matrix multiply step itself. However, in the Galaxy's distributed-memory environment it will be easiest to parallelize the initialization and checksum steps, I think.

To receive 75% of the credit: Provide a parallel implementation of matrix multiply based upon assigning rows (or columns) to processors. Share the columns of B by rotating the blocks of columns of B around a virtual ring of the processors. Call your program pmatrix75.c.

To receive 85% of the credit: First complete the 75% level. Then modify your pmatrix75.c to create pmatrix85.c. Perform two modifications:

To receive 100% of the credit: First complete the 75% level. (Note: you do not need to do the 85% level to get 100% of the credit.) Then provide a parallel implementation of matrix multiply based upon assigning two-dimensional sub-matrices to processors. Use the algorithm described in class that requires an initial "stagger" step. (Do not "hide" the cost of this stagger step in the initialization phase.) Call your program pmatrix100.c.

Experiment with your programs using (at least) 4 and 8 processors. Use matrices of size 256 and 512 for the final experiment. (At the 100% level you may need to use size 1024, too.) Report on your running times, compute speedup numbers, and analyze any trends that you recognize in the data you collect. (Be sure to consider whether you are using the correct serial program when computing the speedup.) Place your findings in the "flat" Ascii file named FINAL-REPORT. Also document in this report the basic design of your parallel programs and clearly indicate what level (75%, 85% or 100%) of the assignment you have obtained.

Submitting your assignment: To receive full credit for the assignment, you must turn in your files prior to 8am on Monday October 27. Late submissions will be accepted at the penalty of 5% per day up to one week late. To turn in this assignment, type (on agate.cs.unh.edu)

~cs735/bin/submit prog3 FINAL-REPORT pmatrix75.c

or

~cs735/bin/submit prog3 FINAL-REPORT pmatrix75.c pmatrix85.c

or

~cs735/bin/submit prog3 FINAL-REPORT pmatrix75.c pmatrix100.c

NOTE: You must submit your assignment for grading from agate.cs.unh.edu. Submissions can be checked using ~cs735/bin/scheck. For example, to check your assignment:

    ~cs735/bin/scheck prog3
The scheck program can only be executed on agate.cs.unh.edu.

Remember: as always you are expected to do your own work on this assignment.

Also: you should adequately document and structure your programs.


Last modified on October 7, 1997.

Comments and questions should be directed to pjh@cs.unh.edu