Update tree_broadcast assigment for fall 2010.
authorW. Trevor King <wking@drexel.edu>
Tue, 26 Oct 2010 15:01:40 +0000 (11:01 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 26 Oct 2010 15:01:40 +0000 (11:01 -0400)
assignments/archive/tree_broadcast/index.shtml
assignments/archive/tree_broadcast/index.shtml.2009.10.shtml [new file with mode: 0644]

index ea5718132697c3939c23e74002501fab5c09754f..fffbac5ca965a5fc687c6711e91a0c895538be04 100644 (file)
@@ -1,7 +1,7 @@
 <!--#set var="root_directory" value="../../.." --><!--#include virtual="$root_directory/shared/header.shtml"-->
 
 <h1>Assignment #4</h1>
 <!--#set var="root_directory" value="../../.." --><!--#include virtual="$root_directory/shared/header.shtml"-->
 
 <h1>Assignment #4</h1>
-<p><em>Due Friday, October 23, 2009</em></p>
+<p><em>Due Friday, October 29, 2010</em></p>
 
 <h2>Purpose</h2>
 
 
 <h2>Purpose</h2>
 
 <p>Note: Please identify all your work.</p>
 
 <p>This assignment consists in building your own broadcast code based
 <p>Note: Please identify all your work.</p>
 
 <p>This assignment consists in building your own broadcast code based
-on a binary tree. The code
+on a binary tree.  The code
 <a href="../../../content/global_operations/src/print_tree.c">print_tree.c</a>
 <a href="../../../content/global_operations/src/print_tree.c">print_tree.c</a>
-provides a simple implementation of a binary tree based on node zero
-as being the root. It generates the node numbers from which any node
-is to receive the information and to which to send this
-information.</p>
+(see <a href="../../../content/global_operations/">Global
+Operations</a>) provides a simple implementation of a binary tree
+based on node zero as being the root.  It generates the node numbers
+from which any node is to receive the information and to which to send
+this information.</p>
 
 <h2>Part A</h2>
 
 
 <h2>Part A</h2>
 
@@ -24,8 +25,8 @@ similar as the one provided by MPICH2. It should follow the same
 syntax as <code>MPI_Bcast()</code>, namely</p>
 
 <pre>
 syntax as <code>MPI_Bcast()</code>, namely</p>
 
 <pre>
-int My Bcast(void *buffer, int count, MPI Datatype datatype, int root,
-             MPI Comm comm)
+int My_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
+             MPI_Comm comm)
 </pre>
 
 <p>This function should be based on the skeleton
 </pre>
 
 <p>This function should be based on the skeleton
@@ -34,7 +35,8 @@ is process zero (0). If not, it should print out an error message
 quoting this fact and return an exit code one (1).</p>
 
 <p>Test your routine carefully for various process numbers and
 quoting this fact and return an exit code one (1).</p>
 
 <p>Test your routine carefully for various process numbers and
-different count and datatype in the call.</p>
+different <code>count</code> and <code>datatype</code> in the
+call.</p>
 
 <h2>Part B</h2>
 
 
 <h2>Part B</h2>
 
@@ -49,13 +51,14 @@ to broadcast the information three (3) different ways:</p>
 
 <p>Broadcast 10,000 integers 100 times and take an average over the
 100 broadcasts to smooth out the time fluctuations. Repeat for 10,000
 
 <p>Broadcast 10,000 integers 100 times and take an average over the
 100 broadcasts to smooth out the time fluctuations. Repeat for 10,000
-double. Tabulate your timings and comment on the results.</p>
+<code>double</code>. Tabulate your timings and comment on the
+results.</p>
 
 <h2>Part C</h2>
 
 <p>Modify <code>My_Bcast()</code> to be able to broadcast from any
 process (the root process) within the virtual machine. Check your code
 
 <h2>Part C</h2>
 
 <p>Modify <code>My_Bcast()</code> to be able to broadcast from any
 process (the root process) within the virtual machine. Check your code
-carefully for different <em>root</em> processes and various number of
-processes.</p>
+carefully for different <code>root</code> processes and various numbers
+of processes.</p>
 
 <!--#include virtual="$root_directory/shared/footer.shtml"-->
 
 <!--#include virtual="$root_directory/shared/footer.shtml"-->
diff --git a/assignments/archive/tree_broadcast/index.shtml.2009.10.shtml b/assignments/archive/tree_broadcast/index.shtml.2009.10.shtml
new file mode 100644 (file)
index 0000000..14269bc
--- /dev/null
@@ -0,0 +1,61 @@
+<!--#set var="root_directory" value="../../.." --><!--#include virtual="$root_directory/shared/header.shtml"-->
+
+<h1>Assignment #4</h1>
+<p><em>Due Friday, October 23, 2009</em></p>
+
+<h2>Purpose</h2>
+
+<p>Learn how to implement a truly parallel algorithm.</p>
+
+<p>Note: Please identify all your work.</p>
+
+<p>This assignment consists in building your own broadcast code based
+on a binary tree. The code
+<a href="../../../content/global_operations/src/print_tree.c">print_tree.c</a>
+provides a simple implementation of a binary tree based on node zero
+as being the root. It generates the node numbers from which any node
+is to receive the information and to which to send this
+information.</p>
+
+<h2>Part A</h2>
+
+<p>Write a function <code>My_Bcast()</code> that performs a broadcast
+similar as the one provided by MPICH2. It should follow the same
+syntax as <code>MPI_Bcast()</code>, namely</p>
+
+<pre>
+int My_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
+             MPI_Comm comm)
+</pre>
+
+<p>This function should be based on the skeleton
+code <code>print_tree.c</code>. It should therefore assume that root
+is process zero (0). If not, it should print out an error message
+quoting this fact and return an exit code one (1).</p>
+
+<p>Test your routine carefully for various process numbers and
+different count and datatype in the call.</p>
+
+<h2>Part B</h2>
+
+<p>Instrument your code for timing measurements. Modify your main code
+to broadcast the information three (3) different ways:</p>
+
+<ol>
+  <li>sequentially via a for loop,</li>
+  <li>via your <code>My_Bcast()</code>, and</li>
+  <li>via the MPICH2 <code>MPI_Bcast()</code>.</li>
+</ol>
+
+<p>Broadcast 10,000 integers 100 times and take an average over the
+100 broadcasts to smooth out the time fluctuations. Repeat for 10,000
+double. Tabulate your timings and comment on the results.</p>
+
+<h2>Part C</h2>
+
+<p>Modify <code>My_Bcast()</code> to be able to broadcast from any
+process (the root process) within the virtual machine. Check your code
+carefully for different <em>root</em> processes and various number of
+processes.</p>
+
+<!--#include virtual="$root_directory/shared/footer.shtml"-->