Program 2 FAQ/Tips



What is the grading criteria and turn in procedure for program 2?

Note that late programs will not be accepted.

Grading Criteria

            Correctness

                        Programs must produce the correct output for various inputs.

 

            Readability

                        Your code should not look like spaghetti.

 

            Documentation

                        Code should be well commented.

 

Submission Instructions

 

            Create a directory prog2.yourUserName , which contains the following files:

 

edgeMaster.c edgeWorker.c

 

Makefile.aimk

 

Readme

            Describe how far you got, any remaining bugs, and general notes as necessary.

 

Finally, do these last two steps:

 

prompt> tar cvf prog2.tar prog2.yourUserName

prompt> turnin –c cs160s prog2.tar



2.  Where can I find samples .pgm files to test my program with?

Download this small.pgm and med.pgm file by right clicking on the links and choosing "Save Link As...". You can view these pgm images and the ones generated by your program using the command 'xv filename'.

3.  Will sample output be provided?

No. You should be able to double check your output by inspecting the result of using small.pgm as input.

4.  Can we assume there is no commenting in the image file (e.g. '# XV Version...')?

Yes.

5.  How do we determine the hosts on which the slaves whould be spawned?

Let pvm determine where the slaves should be spawned by passing the flag 'PvmTaskDefault' to spawn. E.g.
numt = pvm_spawn(SLAVENAME, (char **)0, PvmTaskDefault, "", nproc, tids);

6.  Note the case when the height of the image is not evenly divisable by the number of strips. For example, a image of height 100 where the number of strips is 33. First, get your program working when the image height is evenly divisable by the number strips. Then, worry about the former case.