Skip to content

Commit 4e50a70

Browse files
committed
some new content
1 parent 06ae424 commit 4e50a70

File tree

6 files changed

+128
-6
lines changed

6 files changed

+128
-6
lines changed

_includes/head.html

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
{% endif %}
1313
</title>
1414

15+
16+
1517
<!-- Semantic UI, JQuery, etc. -->
1618
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/semantic/semantic.min.css">
1719
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/public/basics.css">

topic_communication/broadcast/introduction.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h3 class="ui header">Roadmap</h3>
2424
<li class="item"><b>Activity #4:</b> Implement a binary-tree-based implementation (with pipelining and asynchronous communication).
2525
</li>
2626
</ul>
27-
<p class="ui">In all activities above you will compare your implementation with <code></code>MPI_Bcast</code>, for different platform configurations.</p>
27+
<p class="ui">In all activities above you will compare your implementation with <code>MPI_Bcast</code>, for different platform configurations.</p>
2828

2929
</div>
3030

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="ui container segment raised">In this activity we distributed the matrices across the MPI processes, which
2+
entails dealing with local vs. global indexing. As opposed to what was seen in previous topics, we now use a 2-D data distribution,
3+
which complicates indexing a bit. We multiply square matrices: <i>A = B x C</i>.
4+
</div>
5+
6+
<div class="ui top attached tabular menu">
7+
<a class="item active" data-tab="data_distribution">Step #1: Data Distribution</a>
8+
</div>
9+
10+
11+
<div class="ui bottom attached tab segment active" data-tab="data_distribution">
12+
13+
{% include_relative data_distribution.html %}
14+
15+
</div>
16+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<p class="ui">
2+
Implement a program called <code>matmul_init</code> (<code>matmul_init.c</code>) that takes a
3+
single command-line argument, <i>N</i>, which is a strictly positive integer. <i>N</i> is the
4+
dimension of the square matrices that we multiply.
5+
6+
7+
</p>
8+
9+
<p class="ui">
10+
YYY
11+
</p>
12+

topic_rigid_programs/matrixmultiplication/index.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ topic: topic03
99

1010
<div class="ui pointing secondary menu">
1111
<a class="item active" data-tab="intro">Introduction</a>
12-
<a class="item " data-tab="activity1">Activity #1</a>
12+
<a class="item " data-tab="2d_matrices">Activity #1</a>
13+
<a class="item " data-tab="outer_product">Activity #2</a>
1314
<a class="item" data-tab="conclusion">Conclusion</a>
1415
</div>
1516

@@ -18,11 +19,17 @@ topic: topic03
1819
</div>
1920

2021

21-
<div class="ui tab segment " data-tab="activity1">
22+
<div class="ui tab segment " data-tab="2d_matrices">
23+
{% include_relative 2d_matrices.html %}
24+
</div>
25+
26+
27+
<div class="ui tab segment" data-tab="outer_product">
2228
{% include_relative tbd.html %}
2329
</div>
2430

2531

32+
2633
<div class="ui tab segment" data-tab="conclusion">
2734
{% include_relative tbd.html %}
2835
</div>

topic_rigid_programs/matrixmultiplication/introduction.html

+88-3
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,99 @@ <h3 class="ui header">Overview</h3>
99

1010
</div>
1111

12+
13+
<div class="ui container raised segment fluid">
14+
15+
<h3 class="ui header">2-D Data Distribution</h3>
16+
17+
<p class="ui">
18+
We consider the standard outer-product parallel matrix multiplication, as described throughout this module,
19+
for a <i>2-D block data distribution</i>. More precisely, we consider the C = A×B multiplication
20+
where all three matrices are square of dimensions N×N, and contain double precision floating point numbers.
21+
The execution takes place on p processors, <b>where p is a perfect square and √p
22+
divides N</b>. Each processor thus holds a
23+
N/√p × N/√p square block of each matrix. </p>
24+
25+
<p class="ui">
26+
For instance, with N=6, consider example matrix A as shown below:
27+
</p>
28+
29+
<p style="text-align:center;" class="ui">
30+
<pre>
31+
10 20 30 40 50 60
32+
11 21 31 41 51 61
33+
12 22 32 42 52 62
34+
13 23 33 43 53 63
35+
14 24 34 44 54 64
36+
15 25 35 45 55 65
37+
</pre>
38+
</p>
39+
40+
<p class="ui">
41+
Now let's assume that p=4. The 4 processes are logically organized in a 2x2 grid (hence the name of the data
42+
distribution) in row-major order as follows:
43+
</p>
44+
45+
<p style="text-align:center;" class="ui">
46+
47+
<table class="ui collapsing celled table">
48+
<tbody>
49+
<tr>
50+
<td>process #0</td>
51+
<td>process #1</td>
52+
</tr>
53+
<tr>
54+
<td>process #2</td>
55+
<td>process #3</td>
56+
</tr>
57+
</tbody>
58+
</table>
59+
60+
</p>
61+
62+
<p class="ui">
63+
In this setup, for instance, process #0 holds the following 3x3 block of matrix A:
64+
</p>
65+
66+
<p style="text-align:center;" class="ui">
67+
<pre>
68+
10 20 30
69+
11 21 31
70+
12 22 32
71+
</pre>
72+
</p>
73+
74+
<p class="ui">
75+
and process #2 holds the following 3x3 block of matrix A:
76+
</p>
77+
78+
<p style="text-align:center;" class="ui">
79+
<pre>
80+
43 53 63
81+
44 54 64
82+
45 55 65
83+
</pre>
84+
</p>
85+
86+
<p>At process #2, element with value 54 has local indices (1,1), but its global indices are (5,5), assuming that
87+
indices start at 0.
88+
</p>
89+
90+
91+
92+
</div>
93+
94+
1295
<div class="ui container segment raised fluid">
1396
<h3 class="ui header">Roadmap</h3>
14-
<p class="ui">This module consists of <b>XXXX activities, each described in its own tab above, which should be done in
97+
<p class="ui">This module consists of <b>2 activities, each described in its own tab above, which should be done in
1598
sequence:</b>
1699
</p>
17100
<ul class="ui list">
18-
<li class="item"><b>Activity #1:</b> XXXX.
101+
<li class="item"><b>Activity #1:</b> Have each MPI process allocate and initialize its own
102+
block of particular matrices, using the 2-D distribution scheme.
103+
</li>
104+
<li class="item"><b>Activity #2:</b> Implement the outer product matrix multiplication algorithm.
19105
</li>
20106
</ul>
21107
</div>
@@ -28,7 +114,6 @@ <h3 class="ui header">What to turn in</h3>
28114
<div class="item">All source code</div>
29115
<div class="item">XML platform files (see details in the activities)</div>
30116
<div class="item">A Makefile that compiles all executables (and has a 'clean' target!)</div>
31-
<div class="item">A README file with answers to the questions asked in the activities</div>
32117
</div>
33118
</p>
34119
</div>

0 commit comments

Comments
 (0)