We will give you research accounts on cabernet, a Sun E5000 SMP owned by the Wisconsin Multifacet project. Unless you already had an account, you should only use this machine only for this assigment or, with my further permission, for your course project. In any case, you should never interfere with the research work on the machine.
Feel free to copy the example in file /p/course/cs757-markhill/public/eg.c, written by Scott Colville in 1998.
(a) Write a shared-memory program that reads in two N x N matrices, multiplies them, and writes the output to a file. Your program should operate in parallel with P processors specified on the command line. It is okay to only handle the easy cases (e.g., N is multiple of P).
(b) For N a power of two, how big does N have to be for your program to reliably take over one minute in the paralle phase?
(c) Write an improved program that multiplies matrices more rapidly (where N is the set to the size of your answer to part (b).
(a) Write the same program as in Problem 1 except this time write it using message-passing mechanisms instead of shared memory. You will be using the MPI (Message Passing Interface) standard to implement your message-passing code. You will be able to write C (not C++) code, compile it, and run it on cabernet. To see how to get started, go to the Getting Started section.