CS735/CS835 Programming Assignment 5 (due Sun Nov 23)


This program concerns the parallel implementation of an edge detection algorithm. Write a parallel program for the Sobel edge detection algorithm using NXS on the Galaxy cluster. A serial implementation of the algorithm is given in ~cs735/public/sobel (on agate.cs.unh.edu).

The program operates on images stored in PGM format. PGM files may be displayed using xv. Two PGM files are being distributed for testing: einstein.pgm and fish.pgm. Use the fish image when you are debugging your program. Use the Einstein image for performing your final timings.

Concentrate (and only time) the edge detection algorithm itself. Do the input from one processor and then generate messages to distribute the pixels to processors. After the edge detection algorithm has finished then collect the full result image on one processor and then output it to a file. Do not time the input/output phases.

To receive 75% of the credit: Provide a parallel implementation of the Sobel edge detection algorithm that distributes rows (or columns) of pixels to processors. Call this version of the program psobel75.c.

To receive 85% of the credit: First complete the 75% level. Provide a parallel implementation of the Sobel edge detection algorithm that distributes pixels in two-dimensional blocks. Use "overlap areas" to store the non-local values used in the convolutions. Use direct point-to-point messages to communicate the non-local values. Call this version of the program psobel85.c.

To receive 100% of the credit: First complete the 75% and 85% levels. Modify your 85% program to used "staged delivery" of the messages to reduce the total number of messages transmitted. Call this version of the program psobel100.c.

Experiment with your program using 1, 2, 4 and 8 processors on the Galaxy cluster. Use the Einstein image for these experiments. 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. Clearly indicate in your report what level (75%, 85% or 100%) of the assignment you have obtained.

In your report be sure to analyze the differences between your different versions of the program. Which program gave the best performance? Why?

Submitting your assignment: To receive full credit for the assignment, you must turn in your files prior to 8am on Monday November 24. 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 prog5 FINAL-REPORT psobel75.c psobel85.c psobel100.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 prog5
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 November 9, 1997.

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