From 1d73581b36b492973ec81e32a13d67c42ad43e3e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 9 Nov 2010 10:51:05 -0500 Subject: [PATCH] Update assigment 5 for Fall 2009. --- .../archive/mandelbrot/index.2009.11.shtml | 63 +++++++++++++++++++ assignments/archive/mandelbrot/index.shtml | 62 +++--------------- assignments/current/5 | 2 +- 3 files changed, 74 insertions(+), 53 deletions(-) create mode 100644 assignments/archive/mandelbrot/index.2009.11.shtml diff --git a/assignments/archive/mandelbrot/index.2009.11.shtml b/assignments/archive/mandelbrot/index.2009.11.shtml new file mode 100644 index 0000000..6c3cdbb --- /dev/null +++ b/assignments/archive/mandelbrot/index.2009.11.shtml @@ -0,0 +1,63 @@ + + +

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

+ +

Write a code to

+ + + +

Part B

+ +

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.

+ +

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

+ + diff --git a/assignments/archive/mandelbrot/index.shtml b/assignments/archive/mandelbrot/index.shtml index 6c3cdbb..5423f0b 100644 --- a/assignments/archive/mandelbrot/index.shtml +++ b/assignments/archive/mandelbrot/index.shtml @@ -1,63 +1,21 @@ -

Assignment #6

-

Due Friday, November 5, 2009

+

Assignment #5

+

Due Friday, November 5, 2010

Purpose

-

Learn how to implement a hostless parallel algorithm.

+

Learn how to implement a truly 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.

+

This assignment consists of rewriting +the MS2.c code calculating +the Mandelbrot Set to use a Master-Slave approach. This is equivalent +to writing MS3.c from +the notes.

-

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

- -

Write a code to

- - - -

Part B

- -

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.

- -

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

+

Write the code so as to form an image by piping the data +into plot_image.py.

diff --git a/assignments/current/5 b/assignments/current/5 index 802b16c..9869977 120000 --- a/assignments/current/5 +++ b/assignments/current/5 @@ -1 +1 @@ -../archive/monte_carlo_integration/ \ No newline at end of file +../archive/mandelbrot/ \ No newline at end of file -- 2.26.2