From: W. Trevor King Date: Tue, 14 Sep 2010 14:14:20 +0000 (-0400) Subject: Convert mandelbrot.pdf assigment to XHTML. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5732708a44f532297f99b54dbe03fd8b04769d5a;p=parallel_computing.git Convert mandelbrot.pdf assigment to XHTML. --- diff --git a/assignments/archive/mandelbrot.pdf/assigment.pdf b/assignments/archive/mandelbrot.pdf/assigment.pdf deleted file mode 100644 index 9db2698..0000000 Binary files a/assignments/archive/mandelbrot.pdf/assigment.pdf and /dev/null differ diff --git a/assignments/archive/mandelbrot/index.shtml b/assignments/archive/mandelbrot/index.shtml index ec10799..6c3cdbb 100644 --- a/assignments/archive/mandelbrot/index.shtml +++ b/assignments/archive/mandelbrot/index.shtml @@ -1,51 +1,63 @@ -

Assignment #5

-

Due Friday, November 16, 2007

- -

Purpose:

- -

To learn parallel coding and the MPE graphics environment.

- -

Setup

- -

This assignment consists in implementing and displaying the -Mandelbrot Set in parallel.

+

Assignment #6

+

Due Friday, November 5, 2009

+ +

Purpose

+ +

Learn how to implement a hostless parallel algorithm.

+ +

Note: Please identify all your work.

+ +

This assignment consists in rewriting the code calculating the +Mandelbrot Set in a static load balance approach using a hostless +parallel algorithm.

+ +

In a hostless parallel algorithm, all nodes are treated on +the same basis, except possibly for a brief dialogue with the user to +start with and some post-processing of the data at the end of the +calculation by node 0. In general, this paradigm is simpler to code +than a master-slave approach. But it requires to find a way to divide +the problem in parcels of equal complexity, therefore taking +equivalent time to compute.

+ +

In the Mandelbrot Set adjacent lines of pixels in the image ought +to take comparable times to compute. Therefore a static load balance +algorithm follows by requesting the nodes (including node 0 — +therefore a hostless algorithm) to calculate the lines in the image on +a cyclic basis. For instance, if three (3) nodes are used, each node +should compute the lines of pixels according to the following +table:

+ + + + + + +
nodelines
0 0, 3, 6, 9, ...
1 1, 4, 7, 10, ...
2 2, 5, 8, 11, ...

Part A

-

Parallelize the Mandelbrot Set. To do so use a model in which all -the processes, except rank 0, perform the same operations. Let rank 0 -process set the parameters, launch the calculation in -the size-1 other worker processes, collect the data and -print out the data to form the image.

- -

The algorithm to follow for each worker processes is to calculate -alternate "horizontal" lines (parallel to Creal) modulo their -rank. For example, in a size=4 processes parallel system, -process 1 would compute lines 0, 3, 6, .., while process 2 would -compute lines 1, 4, 7, ... and process 3 would compute lines 2, 5, 8, -... In doing so one would hope to have approximately the same load in -each worker process on average. This is a static load balance -model.

+

Write a code to

-

Call the code MS_static_load.c.

+

Part B

-

Modify the code in part A to use the MPE graphics package to -display the Mandelbrot Set directly from each worker process. Call -this code MS_static_load_mpe.c.

- -

Part C

+

Include timing calls in your code to prove (or disprove) the +assumption that the approach described above really leads to a proper +load balance. Quantify the time variations in the nodes when using +from 2 to 16 nodes.

-

Modify the code in part B to use the MPE graphics package to pick -up new a zoomed section of the Mandelbrot Set via two mouse clicks to -define a selected area of the image and calculate anew the Mandelbrot -Set in this expanded area. This requires -using MPE_Get_mouse_press() from within an event loop -from within process 0. Please think of a way to stop this zooming -other than CTRL-C. Call this code -MS_static_load_zoom.c.

+

You could solve this assignment +on borg0.physics.drexel.edu.

diff --git a/assignments/archive/mandelbrot/index.shtml.2007.11.shtml b/assignments/archive/mandelbrot/index.shtml.2007.11.shtml new file mode 100644 index 0000000..ec10799 --- /dev/null +++ b/assignments/archive/mandelbrot/index.shtml.2007.11.shtml @@ -0,0 +1,51 @@ + + +

Assignment #5

+

Due Friday, November 16, 2007

+ +

Purpose:

+ +

To learn parallel coding and the MPE graphics environment.

+ +

Setup

+ +

This assignment consists in implementing and displaying the +Mandelbrot Set in parallel.

+ +

Part A

+ +

Parallelize the Mandelbrot Set. To do so use a model in which all +the processes, except rank 0, perform the same operations. Let rank 0 +process set the parameters, launch the calculation in +the size-1 other worker processes, collect the data and +print out the data to form the image.

+ +

The algorithm to follow for each worker processes is to calculate +alternate "horizontal" lines (parallel to Creal) modulo their +rank. For example, in a size=4 processes parallel system, +process 1 would compute lines 0, 3, 6, .., while process 2 would +compute lines 1, 4, 7, ... and process 3 would compute lines 2, 5, 8, +... In doing so one would hope to have approximately the same load in +each worker process on average. This is a static load balance +model.

+ +

Call the code MS_static_load.c.

+ +

Part B

+ +

Modify the code in part A to use the MPE graphics package to +display the Mandelbrot Set directly from each worker process. Call +this code MS_static_load_mpe.c.

+ +

Part C

+ +

Modify the code in part B to use the MPE graphics package to pick +up new a zoomed section of the Mandelbrot Set via two mouse clicks to +define a selected area of the image and calculate anew the Mandelbrot +Set in this expanded area. This requires +using MPE_Get_mouse_press() from within an event loop +from within process 0. Please think of a way to stop this zooming +other than CTRL-C. Call this code +MS_static_load_zoom.c.

+ + diff --git a/assignments/current/6 b/assignments/current/6 index ccdbb77..9869977 120000 --- a/assignments/current/6 +++ b/assignments/current/6 @@ -1 +1 @@ -../archive/mandelbrot.pdf \ No newline at end of file +../archive/mandelbrot/ \ No newline at end of file diff --git a/assignments/index.shtml b/assignments/index.shtml index b63c3ff..a8eb5de 100644 --- a/assignments/index.shtml +++ b/assignments/index.shtml @@ -8,7 +8,7 @@
  • Assignment 3
  • Assignment 4
  • Assignment 5
  • -
  • Assignment 6
  • +
  • Assignment 6
  • Assignment 7
  • Assignment 8
  • Assignment 9