Laboratory Exercises For Computer Science 295

Lab 6: Parallel Computation of Fractals

Lab 6: Parallel Computation of Fractals

Goals: This lab applies sr's parallel processing capabilities and XTANGO's graphical capabilities to the computation and display of the Julia set.

This lab builds upon your revised fractals program from part 6 of the previous lab.

Steps for this Lab:

  1. Your revised fractals program from the previous lab wrote a separate rectangle for each point computed in the Julia set. Modify this program further, so that it processes the results array by columns. In scanning down a column, determine when two or more points should have the same color. In such cases, this modified program should only designate one rectangle for XTANGO. (This will dramatically cut down on the number of graphical objects that XTANGO must process. Hence, XTANGO will run more quickly.)

  2. Modify your result from step 1 further, so that the results holds data for only one column. (Thus, results should be a 1-dimensional array rather than 2-dimensional.) In this revised program, results for a column of the Julia set should be computed and then printed immediately. Thus, all processing for one column should be finished before any processing for the next column begins.

  3. Modify your resulting program from step 2 again -- this time so that all computation is done in a separate resource, which is called by a driver program.

  4. Modify your resulting program from step 3 again -- so that the resource processes a block of columns. The resource then should be called p times from the main driver. While you may include several parameters to the computation resource, be sure that at least one of the parameters includes an index id which takes on the values 1 through p in the various calls.

  5. Modify your resulting program from step 4 again -- so that each resource is run as multiple processes on the same processor. Thus, you will need to create process capabilities, and then run appropriate copies of the computation resource on these processes. So that you can watch the parallel computation more clearly, insert a nap(100) statement at the end of processing each column.

  6. Modify your resulting program from step 5 one more time -- so that the processes are running on separate processors.

    In your program, use a constant num_processors to indicate how many processors to be utilized. The program should allow this constant to be changed to any number between 2 and 6. Potential processors to be utilized should be zermelo, viete, sylow, tarski, ulam, and bolzano.

    If you run the program several times, you may find that occassionally XTANGO reports an error in input. If this occurs, document what happens and make a conjecture about why.


Work to be turned in:


This document is available on the World Wide Web as

http://www.math.grin.edu/~walker/courses/295/lab6.html

created February 17, 1997
last revised February 17, 1997