Skip to content

Commit f3263e5

Browse files
Merge pull request #6 from charmplusplus/ExerciseUpdates
Restructured Website
2 parents aa74708 + 74baf12 commit f3263e5

File tree

4 files changed

+81
-65
lines changed

4 files changed

+81
-65
lines changed

content/exercises.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,9 @@ <h2>!! Under Construction, the following is currently being updated and will inc
3838
<li><a href="k-means">K-Means Clustering</a></li>
3939
<li><a href="oddevensort">Odd-even sort</a></li>
4040
<li><a href="particle">Particle exercise</a></li>
41-
</ol>
42-
<li><h2>Load Balancing</h2></li>
43-
<ol>
44-
<li><a href="loadbalancing">Particle Exercise with multiple types of particles</a></li>
45-
<ol>
46-
<li>Add load balancing</li>
47-
<li>Add projections and show impact of load balancing via time-profile and timeline</li>
48-
<li>Add liveviz</li>
49-
</ol>
41+
<li><a href="loadbalancing">Particle exercise with load balancing</a></li>
42+
<li><a href="projections">Particle exercise with projections</a></li>
43+
<li><a href="liveViz">Particle exercise with liveViz</a></li>
5044
</ol>
5145
<li><h2>Structured Dagger</h2></li>
5246
<ol>

content/exercises/liveViz.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: LiveViz Particle Exercise (Extension)
3+
homec: home
4+
tutorialc: tutorial
5+
applicationsc: applications
6+
miniAppsc: miniApps
7+
downloadc: download
8+
toolsc: tools
9+
helpc: help
10+
---
11+
12+
<link rel="stylesheet" type="text/css" href="../../tutorial/TutorialStyle.css">
13+
14+
<h1>LiveViz: Particle Exercise <em>(Extension)</em></h1>
15+
16+
<table class="StandardFigure" align="right" border="0">
17+
<tr><td align="center" valign="middle">
18+
<a href="../images/particlescode_lb.png">
19+
<img class="StandardFigure" src="../images/particlescode_lb.png" border="0" width="200">
20+
</a>
21+
</td></tr>
22+
<tr><td align="center" valign="middle"><b>Figure&nbsp;1</b></td></tr>
23+
</table>
24+
25+
<p>For this exercise, continue by building upon your work for the previous exercise. Add colour to emphasise the skew and watch the balancer work.</p>
26+
27+
<ol>
28+
<li>
29+
Extend each chare to contain particles of three different colors. Each color should move at different speeds - green should move at the default speed, red should move twice as fast and green should move half as fast.
30+
</li>
31+
32+
<li>
33+
Distribute colours to reproduce the imbalance as shown in the figure: reds bunched in the centre, greens in the upper-left, blues in the lower-right.
34+
</li>
35+
36+
<li>
37+
Compile with <a href="https://github.com/UIUC-PPL/ccs_tools">LiveViz</a> using the <code>-module liveViz</code> flag.
38+
</li>
39+
40+
<li>
41+
Run your C++ code using <code>++server</code> and <code>++server-port 1234</code>, and then run the liveViz client using <code>liveVize localhost 1234</code>, and observe how the particles behave.
42+
</li>
43+
</ol>

content/exercises/loadbalancing.html

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,7 @@
1313

1414
<h1>Load Balancing: Particle Exercise <em>(Extension)</em></h1>
1515

16-
<table class="StandardFigure" align="right" border="0">
17-
<tr><td align="center" valign="middle">
18-
<a href="../images/particlescode_lb.png">
19-
<img class="StandardFigure" src="../images/particlescode_lb.png" border="0" width="375">
20-
</a>
21-
</td></tr>
22-
<tr><td align="center" valign="middle"><b>Figure&nbsp;1</b></td></tr>
23-
</table>
24-
<h2>Part&nbsp;1 – Introducing Imbalance</h2>
25-
26-
<p>The very first task is to create measurable imbalance so that load balancers have something meaningful to fix.</p>
16+
<p>For this exercise, continue by building upon your work for the previous exercise. You will now work to create measurable imbalance so that load balancers have something meaningful to fix.</p>
2717

2818
<ol>
2919
<li>
@@ -39,48 +29,4 @@ <h2>Part&nbsp;1 – Introducing Imbalance</h2>
3929
</li>
4030
</ol>
4131

42-
<p><u>Variants</u>: Instructors may choose to use a different formula for introducing imbalance</p>
43-
44-
<!-- =================================================================== -->
45-
<h2>Part&nbsp;2 – Adding Migration Support &amp; Load-Balancing</h2>
46-
47-
<p>Now enable dynamic migration so Charm++ balancers can actually move work around.</p>
48-
49-
<ol>
50-
<li>
51-
Implement <code>PUP</code> serialization for your chare array as <a href="https://charm.readthedocs.io/en/latest/charm++/manual.html#arraymigratable">documented</a>.
52-
</li>
53-
<li>
54-
At appropriate intervals, call <code><a href="https://charm.readthedocs.io/en/latest/charm++/manual.html#load-balancing-chare-arrays">AtSync()</a></code> so the runtime knows the chare is ready for potential migration.
55-
</li>
56-
<li>
57-
Select a load-balancing strategy. For this exercise we will use
58-
<code>GreedyRefineLB</code> (use option <code>-balancer GreedyRefineLB</code>).
59-
</li>
60-
61-
<li>
62-
Re-run the application as in Part&nbsp;1 and compare how the program behaves differently.
63-
</li>
64-
</ol>
65-
66-
<h2>Part&nbsp;3 – Visualising with LiveViz</h2>
67-
68-
<p>Add colour to emphasise the skew and watch the balancer work.</p>
69-
70-
<ol>
71-
<li>
72-
Extend each chare to contain particles of three different colors. Each color should move at different speeds - green should move at the default speed, red should move twice as fast and green should move half as fast.
73-
</li>
74-
75-
<li>
76-
Distribute colours to reproduce the imbalance as shown in the figure: reds bunched in the centre, greens in the upper-left, blues in the lower-right.
77-
</li>
78-
79-
<li>
80-
Compile with <a href="https://github.com/UIUC-PPL/ccs_tools">LiveViz</a> using the <code>-module liveViz</code> flag.
81-
</li>
82-
83-
<li>
84-
Run your C++ code using <code>++server</code> and <code>++server-port 1234</code>, and then run the liveViz client using <code>liveVize localhost 1234</code>, and observe how the particles behave.
85-
</li>
86-
</ol>
32+
<p><u>Variants</u>: Instructors may choose to use a different formula for introducing imbalance</p>

content/exercises/projections.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Projections Particle Exercise (Extension)
3+
homec: home
4+
tutorialc: tutorial
5+
applicationsc: applications
6+
miniAppsc: miniApps
7+
downloadc: download
8+
toolsc: tools
9+
helpc: help
10+
---
11+
12+
<link rel="stylesheet" type="text/css" href="../../tutorial/TutorialStyle.css">
13+
14+
<h1>Projections: Particle Exercise <em>(Extension)</em></h1>
15+
16+
<p>For this exercise, continue by building upon your work for the previous exercise. You will now work to enable dynamic migration so Charm++ balancers can actually move work around.</p>
17+
18+
<ol>
19+
<li>
20+
Implement <code>PUP</code> serialization for your chare array as <a href="https://charm.readthedocs.io/en/latest/charm++/manual.html#arraymigratable">documented</a>.
21+
</li>
22+
<li>
23+
At appropriate intervals, call <code><a href="https://charm.readthedocs.io/en/latest/charm++/manual.html#load-balancing-chare-arrays">AtSync()</a></code> so the runtime knows the chare is ready for potential migration.
24+
</li>
25+
<li>
26+
Select a load-balancing strategy. For this exercise we will use
27+
<code>GreedyRefineLB</code> (use option <code>-balancer GreedyRefineLB</code>).
28+
</li>
29+
30+
<li>
31+
Re-run the application as in Part&nbsp;1 and compare how the program behaves differently.
32+
</li>
33+
</ol>

0 commit comments

Comments
 (0)