CS735/CS835
Programming Assignment 2
(due Sun Oct 20)


Design and implement a class for performing collective operations defined over a set of threads.

The class should include the following methods:

This class should then be used to create a multithreaded version of the Gaussian Elimination program given in ~cs735/public/prog2/gaussian.java.

For Program 3 you will re-implement this class for use in a distributed-memory environment.

Think carefully about what the exact semantics should be for the methods of this class. You want the methods to be as efficient as possible and to be portable from shared-memory to distributed-memory environments.

Issues to consider include:

You should test and document the performance of the tournament and broadcast methods independent of each other and of the Gaussian Elimination program. Create a stand-alone multithreaded main program for each method and test and time the performance using 1, 2, 4 and 8 threads.

You should also test and time the performance of the multithreaded Gaussian Elimination program using 1, 2, 4 and 8 threads.

All programs should be executed on lava.cs.unh.edu.

You should write a laboratory report for this assignment. The report and the programming will be worth equal amounts in the grading of this assignment. The report should carefully document the design of the class. Explain the design decisions that you make. The report should also analyze the performance that you measure for the two methods, as well as for the Gaussian Elimination program. Compute speed-up values for the Gaussian Elimination program.

Points will be awarded for this assignment in the following way:

  1. Tournament method: 60 points.
  2. Broadcast method: 20 points.
  3. Gaussian Elimination program: 20 points.
Tasks must be completed in the above order.

You should submit your report and all your source code to me via e-mail. Please archive the source code using some standard tool that I can process under Linux. Your e-mail message should include information about how I can process your code archive. Your report should be either just "flat" Ascii or Postscript or PDF. (Please do not send me a Microsoft Word document!)

Do ten runs for each data point to try to avoid anomalies. Try to do your timings at "off hours" when lava is not heavily in use. (This may require that you not do your work at the last minute!) For your report you should summarize the ten runs. Be sure to explain how you summarized the data and include all the raw data as an appendix to your report or in another file in your submission.

To receive full credit for the assignment, you must submit prior to 8am on Monday October 21. Late submissions will be accepted at the penalty of 5 points per day up to one week late.

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

Also: you should adequately document and structure your programs.

And: take care with the writing of your report. Use complete sentences, proper punctuation, etc. Use a spell checker. Most importantly, allocate some time for writing your report. Review and revise as necessary. Your writing will be graded for both clarity and mechanics. Finally, don't forget to include the required analysis in your report.


Last modified on September 29, 2002.

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