Skip to content

Commit 6d8e54c

Browse files
add paragraph breaks in exec model
1 parent 797ee9c commit 6d8e54c

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

content/execmodel.html

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<h1>Execution Model</h1>
66

7-
7+
<p>
88
A basic unit of parallel computation in Charm++ programs is a chare. A chare
99
is similar to a process, an actor, an ADA task, etc. At its most basic level,
1010
it is just a C++ object. A Charm++ computation consists of a large number of
@@ -14,7 +14,8 @@ <h1>Execution Model</h1>
1414
So, these method invocations are sometimes referred to as messages. (besides,
1515
in the implementation, the method invocations are packaged as messages
1616
anyway). Chares can be created dynamically.
17-
17+
</p>
18+
<p>
1819
Conceptually, the system maintains a “work-pool” consisting of seeds for new
1920
chares, and messages for existing chares. The Charm++ runtime system ( Charm
2021
RTS) may pick multiple items, non-deterministically, from this pool and
@@ -33,46 +34,53 @@ <h1>Execution Model</h1>
3334
a constructor invocation) for a new Chare, and invokes the method specified by
3435
the message. When the method returns control back to the scheduler, it repeats
3536
the cycle. I.e. there is no pre-emptive scheduling of other invocations.
36-
37+
</p>
38+
<p>
3739
When a chare method executes, it may create method invocations for other
3840
chares. The Charm Runtime System (RTS, sometimes referred to as the Chare
3941
Kernel in the manual) locates the PE where the targeted chare resides, and
4042
delivers the invocation to the scheduler on that PE.
41-
43+
</p>
44+
<p>
4245
Methods of a chare that can be remotely invoked are called entry methods.
4346
Entry methods may take serializable parameters, or a pointer to a message
4447
object. Since chares can be created on remote processors, obviously some
4548
constructor of a chare needs to be an entry method. Ordinary entry methods [1]
4649
are completely non-preemptive- Charm++ will not interrupt an executing method
4750
to start any other work, and all calls made are asynchronous.
48-
51+
</p>
52+
<p>
4953
Charm++ provides dynamic seed-based load balancing. Thus location (processor
5054
number) need not be specified while creating a remote chare. The Charm RTS
5155
will then place the remote chare on a suitable processor. Thus one can imagine
5256
chare creation as generating only a seed for the new chare, which may take
5357
root on some specific processor at a later time.
54-
58+
</p>
59+
<p>
5560
Chares can be grouped into collections. The types of collections of chares
5661
supported in Charm++ are: chare-arrays, chare-groups, and chare-nodegroups,
5762
referred to as arrays, groups, and nodegroups throughout this manual for
5863
brevity. A Chare-array is a collection of an arbitrary number of migratable
5964
chares, indexed by some index type, and mapped to processors according to a
6065
user-defined map group. A group (nodegroup) is a collection of chares, with
6166
exactly one member element on each PE (“node”).
62-
67+
</p>
68+
<p>
6369
Charm++ does not allow global variables, except readonly variables. A chare
6470
can normally only access its own data directly. However, each chare is
6571
accessible by a globally valid name. So, one can think of Charm++ as
6672
supporting a global object space.
67-
73+
</p>
74+
<p>
6875
Every Charm++ program must have at least one mainchare. Each mainchare is
6976
created by the system on processor 0 when the Charm++ program starts up.
7077
Execution of a Charm++ program begins with the Charm Kernel constructing all
7178
the designated mainchares. For a mainchare named X, execution starts at
7279
constructor X() or X(CkArgMsg *) which are equivalent. Typically, the
7380
mainchare constructor starts the computation by creating arrays, other chares,
7481
and groups. It can also be used to initialize shared readonly objects.
75-
82+
</p>
83+
<p>
7684
Charm++ program execution is terminated by the CkExit call. Like the exit
7785
system call, CkExit never returns, and it optionally accepts an integer value
7886
to specify the exit code that is returned to the calling shell. If no exit
@@ -81,7 +89,8 @@ <h1>Execution Model</h1>
8189
entry methods are called after a CkExit. CkExit need not be called on all
8290
processors; it is enough to call it from just one processor at the end of the
8391
computation.
84-
92+
</p>
93+
<p>
8594
As described so far, the execution of individual Chares is “reactive”: When
8695
method A is invoked the chare executes this code, and so on. But very often,
8796
chares have specific life-cycles, and the sequence of entry methods they
@@ -95,8 +104,10 @@ <h1>Execution Model</h1>
95104
threaded methods run in light-weight user-level threads, and can block waiting
96105
for data in a variety of ways. Again, only the particular thread of a
97106
particular chare is blocked, while the PE continues executing other chares.
98-
107+
</p>
108+
<p>
99109
The normal entry methods, being asynchronous, are not allowed to return any
100110
value, and are declared with a void return type. However, the sync methods are
101111
an exception to this. They must be called from a threaded method, and so are
102112
allowed to return (certain types of) values.
113+
</p>

0 commit comments

Comments
 (0)