This program concerns the emulation of the NXS message-passing primitives on a shared-memory multiprocessor using threads.
To receive 75% of the credit: Implement all the NXS routines on agate.cs.unh.edu. Call your implementation nxs.c.
You may assume that the message-passing programs to be used with your implementation of NXS will:
Your NXS implementation must include the main function (called "main") that should:
To receive 85% of the credit: First complete the 75% level. Then modify your 75% level program from program 3 to be used with your NXS implementation for a shared-memory multiprocessor. Call this modified program pmatrix85.c Finally evaluate the effectiveness of your NXS implementation by comparing this modified message-passing program against the native threads program you wrote for the 75% level of program 2.
To receive 100% of the credit: First complete the 75% and 85% levels. Add a synchronous send primitive to NXS called ssend. The semantics should be similar to the MPI_SSEND routine: it waits until the matching receive is posted by the destination processor and does not return until it is safe for the caller to reuse its buffer. Be sure to consider the case where the matching receive is done with a wildcard for the type selector.
Then further modify the message-passing matrix multiply program to use synchronous sends. Call this program pmatrix100.c. Compare this program to the native threads program from program 2 and your 85% level program.
Your experiments at both the 85% and 100% levels should use (at least) 1, 2, 4 and 8 processors (threads). Use matrices of size 128 and 256. Report on your running times, compute speedup numbers, and analyze any trends that you recognize in the data you collect. Place your findings in the "flat" Ascii file named FINAL-REPORT. In this report describe your NXS implementation and clearly indicate what level (75%, 85% or 100%) of the assignment you have obtained. Also describe in this report how you tested your NXS implementation for features not exercised explicitly in pmatrix85.c and pmatrix100.c.
Submitting your assignment: To receive full credit for the assignment, you must turn in your files prior to 8am on Monday November 10. 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 prog4 FINAL-REPORT nxs.c pmatrix85.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 prog4The 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.
Comments and questions should be directed to pjh@cs.unh.edu