Skip to content

Commit

Permalink
some new content
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Jun 16, 2016
1 parent 06ae424 commit 4e50a70
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 6 deletions.
2 changes: 2 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
{% endif %}
</title>



<!-- Semantic UI, JQuery, etc. -->
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/semantic/semantic.min.css">
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/public/basics.css">
Expand Down
2 changes: 1 addition & 1 deletion topic_communication/broadcast/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h3 class="ui header">Roadmap</h3>
<li class="item"><b>Activity #4:</b> Implement a binary-tree-based implementation (with pipelining and asynchronous communication).
</li>
</ul>
<p class="ui">In all activities above you will compare your implementation with <code></code>MPI_Bcast</code>, for different platform configurations.</p>
<p class="ui">In all activities above you will compare your implementation with <code>MPI_Bcast</code>, for different platform configurations.</p>

</div>

Expand Down
16 changes: 16 additions & 0 deletions topic_rigid_programs/matrixmultiplication/2d_matrices.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="ui container segment raised">In this activity we distributed the matrices across the MPI processes, which
entails dealing with local vs. global indexing. As opposed to what was seen in previous topics, we now use a 2-D data distribution,
which complicates indexing a bit. We multiply square matrices: <i>A = B x C</i>.
</div>

<div class="ui top attached tabular menu">
<a class="item active" data-tab="data_distribution">Step #1: Data Distribution</a>
</div>


<div class="ui bottom attached tab segment active" data-tab="data_distribution">

{% include_relative data_distribution.html %}

</div>

12 changes: 12 additions & 0 deletions topic_rigid_programs/matrixmultiplication/data_distribution.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<p class="ui">
Implement a program called <code>matmul_init</code> (<code>matmul_init.c</code>) that takes a
single command-line argument, <i>N</i>, which is a strictly positive integer. <i>N</i> is the
dimension of the square matrices that we multiply.


</p>

<p class="ui">
YYY
</p>

11 changes: 9 additions & 2 deletions topic_rigid_programs/matrixmultiplication/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ topic: topic03

<div class="ui pointing secondary menu">
<a class="item active" data-tab="intro">Introduction</a>
<a class="item " data-tab="activity1">Activity #1</a>
<a class="item " data-tab="2d_matrices">Activity #1</a>
<a class="item " data-tab="outer_product">Activity #2</a>
<a class="item" data-tab="conclusion">Conclusion</a>
</div>

Expand All @@ -18,11 +19,17 @@ topic: topic03
</div>


<div class="ui tab segment " data-tab="activity1">
<div class="ui tab segment " data-tab="2d_matrices">
{% include_relative 2d_matrices.html %}
</div>


<div class="ui tab segment" data-tab="outer_product">
{% include_relative tbd.html %}
</div>



<div class="ui tab segment" data-tab="conclusion">
{% include_relative tbd.html %}
</div>
Expand Down
91 changes: 88 additions & 3 deletions topic_rigid_programs/matrixmultiplication/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,99 @@ <h3 class="ui header">Overview</h3>

</div>


<div class="ui container raised segment fluid">

<h3 class="ui header">2-D Data Distribution</h3>

<p class="ui">
We consider the standard outer-product parallel matrix multiplication, as described throughout this module,
for a <i>2-D block data distribution</i>. More precisely, we consider the C = A×B multiplication
where all three matrices are square of dimensions N×N, and contain double precision floating point numbers.
The execution takes place on p processors, <b>where p is a perfect square and √p
divides N</b>. Each processor thus holds a
N/√p × N/√p square block of each matrix. </p>

<p class="ui">
For instance, with N=6, consider example matrix A as shown below:
</p>

<p style="text-align:center;" class="ui">
<pre>
10 20 30 40 50 60
11 21 31 41 51 61
12 22 32 42 52 62
13 23 33 43 53 63
14 24 34 44 54 64
15 25 35 45 55 65
</pre>
</p>

<p class="ui">
Now let's assume that p=4. The 4 processes are logically organized in a 2x2 grid (hence the name of the data
distribution) in row-major order as follows:
</p>

<p style="text-align:center;" class="ui">

<table class="ui collapsing celled table">
<tbody>
<tr>
<td>process #0</td>
<td>process #1</td>
</tr>
<tr>
<td>process #2</td>
<td>process #3</td>
</tr>
</tbody>
</table>

</p>

<p class="ui">
In this setup, for instance, process #0 holds the following 3x3 block of matrix A:
</p>

<p style="text-align:center;" class="ui">
<pre>
10 20 30
11 21 31
12 22 32
</pre>
</p>

<p class="ui">
and process #2 holds the following 3x3 block of matrix A:
</p>

<p style="text-align:center;" class="ui">
<pre>
43 53 63
44 54 64
45 55 65
</pre>
</p>

<p>At process #2, element with value 54 has local indices (1,1), but its global indices are (5,5), assuming that
indices start at 0.
</p>



</div>


<div class="ui container segment raised fluid">
<h3 class="ui header">Roadmap</h3>
<p class="ui">This module consists of <b>XXXX activities, each described in its own tab above, which should be done in
<p class="ui">This module consists of <b>2 activities, each described in its own tab above, which should be done in
sequence:</b>
</p>
<ul class="ui list">
<li class="item"><b>Activity #1:</b> XXXX.
<li class="item"><b>Activity #1:</b> Have each MPI process allocate and initialize its own
block of particular matrices, using the 2-D distribution scheme.
</li>
<li class="item"><b>Activity #2:</b> Implement the outer product matrix multiplication algorithm.
</li>
</ul>
</div>
Expand All @@ -28,7 +114,6 @@ <h3 class="ui header">What to turn in</h3>
<div class="item">All source code</div>
<div class="item">XML platform files (see details in the activities)</div>
<div class="item">A Makefile that compiles all executables (and has a 'clean' target!)</div>
<div class="item">A README file with answers to the questions asked in the activities</div>
</div>
</p>
</div>

0 comments on commit 4e50a70

Please sign in to comment.