|
1 | 1 | <p class="ui">
|
2 |
| - Augment your program that that the Julia set is saved to a bmp file. This requires some coordination between the |
| 2 | + Augment your program so that the Julia set is saved to a bmp file. This requires some coordination between the |
3 | 3 | processes:
|
4 | 4 | <div class="ui list bulleted">
|
5 | 5 | <div class="ui item">Only one process must create the file and write the header</div>
|
|
11 | 11 | <p class="ui">
|
12 | 12 | First you must pick one process to create the file and write the header to it
|
13 | 13 | (it is typical to pick process of rank 0). Second, each process, after its done computing
|
14 |
| - its pixels, waits for a "go ahead!" message from its predecessor, and then sends a "go ahead!" |
| 14 | + its pixels, waits for a "go ahead!" message from its predecessor, writes to the file, and then sends a "go ahead!" |
15 | 15 | message to its successor. The exceptions are the process with rank 0, which does not need to wait for
|
16 | 16 | a message, and the last process, which does not need to send a message. It doesn't really matter
|
17 | 17 | what these messages contain (e.g., they can be a single byte, or even zero-byte messages),
|
|
20 | 20 | </p>
|
21 | 21 |
|
22 | 22 | <p class="ui">
|
23 |
| - <b>Warning:</b> Make sure that your processes compute in parallel. That is, all processes compute, and then |
| 23 | + <b>Warning:</b> Make sure that your processes compute in parallel. That is, all processes compute together, and then |
24 | 24 | they take turn writing what they have computed to the file.
|
25 | 25 | </p>
|
26 | 26 |
|
|
44 | 44 | <div class="content">
|
45 | 45 | <p class="ui message">
|
46 | 46 | Although the above scheme is pretty simple, what we are really doing is creating a <i>logical topology</i>. That is,
|
47 |
| - based on ranks, we impose structure on our set of processes. In this case, a "linear chain" in which process #i communicates |
| 47 | + based on process rank, we impose structure on our set of processes. In this case, a "linear chain" in which process #i communicates |
48 | 48 | with process #i+1. Probably the simplest structure. We will see examples of more complex logical topologies.
|
49 | 49 | Different applications lend themselves naturally to different logical topologies (rings, grids, trees, etc.).
|
50 | 50 | One interesting question, which is outside
|
51 | 51 | the score of this topic, is how well the logical topology matches the physical topology of the actual
|
52 | 52 | parallel platform in use (a good match typically boosts performance). Ideally, one can define a logical topology
|
53 |
| - that makes writing the application intuitive, and that is also well-matched to the physical platform. |
| 53 | + that makes writing the application easy, and that is also well-matched to the physical platform. |
54 | 54 | </p>
|
55 | 55 | </div>
|
56 | 56 | </div>
|
|
0 commit comments