CHARM++ is an object oriented parallel language. What sets CHARM++ apart from traditional programming models such as message passing and shared variable programming is that the execution model of CHARM++ is message-driven. Therefore, computations in CHARM++ are triggered based on arrival of associated messages. These computations in turn can fire off more messages to other (possibly remote) processors that trigger more computations on those processors.
At the heart of any CHARM++ program is a scheduler that repetitively chooses a message from the available pool of messages, and executes the computations associated with that message.
The programmer-visible entities in a CHARM++ program are:
CHARM++ starts a program by creating a single instance of each mainchare on processor 0, and invokes constructor methods of these chares. Typically, these chares then creates a number of other chares, possibly on other processors, which can simultaneously work to solve the problem at hand.
Each chare contains a number of entry methods, which are methods that can be invoked from remote processors. The CHARM++ runtime system needs to be explicitly told about these methods, via an interface in a separate file. The syntax of this interface specification file is described in the later sections.
CHARM++ provides system calls to asynchronously create remote chares and to asynchronously invoke entry methods on remote chares by sending messages to those chares. This asynchronous message passing is the basic interprocess communication mechanism in CHARM++. However, CHARM++ also permits wide variations on this mechanism to make it easy for the programmer to write programs that adapt to the dynamic runtime environment. These possible variations include prioritization (associating priorities with method invocations), conditional message packing and unpacking (for reducing messaging overhead), quiescence detection (for detecting completion of some phase of the program), and dynamic load balancing (during remote object creation). In addition, several libraries are built on top of CHARM++ that can simplify otherwise arduous parallel programming tasks.
The following sections provide detailed information about various features of CHARM++ programming system.
February 13, 2012
Charm Homepage