Charm++

Charm++
Charm++
Paradigm(s) Message-driven parallel programming, Object-based
Appeared in late 1980s (late 1980s)
Developer Wennie Shu, Kevin Nomura, Laxmikant Kale
Stable release 6.2.1
Implementation language Charm++, Python scripting language, Structured dagger (for coordination),
Platform ASCI Red, Cray T3E, SGI Origin2000
Website http://charm.cs.uiuc.edu/research/charm/

Charm++ is a parallel object-oriented programming language based on C++ and developed in the Parallel Programming Laboratory at the University of Illinois. Charm++ is designed with the goal of enhancing programmer productivity by providing a high-level abstraction of a parallel program while at the same time delivering good performance on a wide variety of underlying hardware platforms. Programs written in Charm++ are decomposed into a number of cooperating message-driven objects called chares. When a programmer invokes a method on an object, the Charm++ runtime system sends a message to the invoked object, which may reside on the local processor or on a remote processor in a parallel computation. This message triggers the execution of code within the chare to handle the message asynchronously.

Chares may be organized into indexed collections called chare arrays and messages may be sent to individual chares within a chare array or to the entire chare array simultaneously.

The chares in a program are mapped to physical processors by an adaptive runtime system. The mapping of chares to processors is transparent to the programmer, and this transparency permits the runtime system to dynamically change the assignment of chares to processors during program execution to support capabilities such as measurement-based load balancing, fault tolerance, automatic checkpointing, and the ability to shrink and expand the set of processors used by a parallel program.

The molecular dynamics simulation package NAMD is implemented using Charm++.

Adaptive MPI (AMPI)[1] is an implementation of the Message Passing Interface standard on top of the Charm++ runtime system and provides the capabilities of Charm++ in a more traditional MPI programming model. AMPI encapsulates each MPI process within a user-level migratable thread implemented as a Charm++ object. By embedding each thread with a chare, AMPI programs can automatically take advantage of the features of the Charm++ runtime system with little or no changes to the underlying MPI program.

Contents

History

Charm++ was developed at the Parallel Programming Laboratory, University of Illinois, by Wennie Shu and Kevin Nomura working with Laxmikant Kale. The second prototype was called Chare Kernel(2.0) was written by Manish Gupta. Charm(3.0) had significant design changes and was developed by a team consisting of Attila Gürsoy, Balkrishna Ramkumar, Amitabh B. Sinha, and Laxmikant Kale. A new translator was written by Nimish Shah. Sanjeev Krishnan made the Charm++ implementation. Charm(4.0) included Charm++. It was released in fall 1993. Charm(4.5) was developed by Attila Gürsoy, Sanjeev Krishnan, Milind Bhandarkar, Joshua Yelon, Narain Jagathesan, and Laxmikant Kale. The same team also developed Charm(4.8) that included Converse, a parallel runtime system that allows interoperability among modules that were written using different paradigms within a single application. After that, the Charm++ runtime system was re-targetted at Converse. Syntactic extensions in Charm++ were dropped, and a simple interface translator was developed (by Sanjeev Krishnan and Jay DeSouza), which became the Charm++ language. The version is 5.8 Revision 1 includes

  1. completely rewritten runtime system and the interface translator (done by Milind Bhandarkar).
  2. several new features such as Chare Arrays (developed by Robert Brunner and Orion Lawlor), and
  3. various libraries (written by Terry Wilmarth, Gengbin Zheng, Laxmikant Kale, Zehra Sura, Milind Bhandarkar, Robert Brunner, and Krishnan Varadarajan.)

After that, a coordination language “Structured Dagger” has been implemented on top of Charm++ by Milind Bhandarkar that was included in this version. Several features have also been added to Converse. Dynamic seed-based load balancing has been implemented (Terry Wilmarth and Joshua Yelon), a client-server interface for Converse programs, and debugging support has been added (Parthasarathy Ramachandran, Jeff Wright, and Milind Bhandarkar). Converse has been ported to new platforms including ASCI Red (Joshua Yelon), Cray T3E (Robert Brunner), and SGI Origin2000 (Milind Bhandarkar). There exists also a test suite for Charm++ developed by Michael Lang, Jackie Wang, and Fang Hu. Projections, the performance visualization and analysis tool, was redesigned and rewritten using Java by Michael Denardo. Orion Lawlor, Gengbin Zheng, and Milind Bhandarkar are responsible for changes to the system since the last release.[2]

Example

Here is some Charm++ code for demonstration purposes:[3]

Header file (hello.h)
#ifndef __HELLO_H__
#define __HELLO_H__
 
class Hello : public CBase_Hello {
 
 public:
 
  /// Constructors ///
  Hello();
  Hello(CkMigrateMessage *msg);
 
  /// Entry Methods ///
  void sayHi(int from);
};
 
#endif //__HELLO_H__
Interface file (hello.ci)
module hello {
 
  array [1D] Hello {
    entry Hello();
    entry void sayHi(int);
  };
 
};
Source file (hello.C)
#include "hello.decl.h"
 
#include "hello.h"
#include "main.decl.h"
 
extern /* readonly */ CProxy_Main mainProxy;
extern /* readonly */ int numElements;
 
Hello::Hello() {
  // Nothing to do when the Hello chare object is created.
  // This is where member variables would be initialized
  // just like in a C++ class constructor.
}
 
// Constructor needed for chare object migration (ignore for now)
// NOTE: This constructor does not need to appear in the ".ci" file
Hello::Hello(CkMigrateMessage *msg) { }
 
void Hello ::sayHi(int from) {
 
  // Have this chare object say hello to the user.
  CkPrintf("\"Hello\" from Hello chare # %d on "
           "processor %d (told by %d).\n",
           thisIndex, CkMyPe(), from);
 
  // Tell the next chare object in this array of chare objects
  // to also say hello. If this is the last chare object in
  // the array of chare objects, then tell the main chare
  // object to exit the program.
  if (thisIndex < (numElements - 1))
    thisProxy[thisIndex + 1].sayHi(thisIndex);
  else
    mainProxy.done();
}
 
#include "hello.def.h"

References

See also

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Charm — (チャルム) Datos generales Origen Barcelona, España Estado …   Wikipedia Español

  • Charm — or charms may refer to: Charm or charisma, a number of socially desirable characteristics such as courtesy, wit and sexiness Charm offensive Superficial charm In mythology Prince Charming, a traditional name for a fairy tale hero Lucky charms… …   Wikipedia

  • Charm — steht in der Teilchenphysik für das Charm Quark dessen Flavour Quantenzahl Charm ist der Personenname von Lee Charm (* 1954), südkoreanischer Fernsehmoderator Nikki Charm (* 1966), US amerikanische Pornodarstellerin Weiteres Charm++,… …   Deutsch Wikipedia

  • Charm — est une association en faveur de l’Arménie qui a été créée en 2002 suite au voyage en Arménie organisé par l’Aumônerie des Gymnases de Beaulieu, Burier et Morges dans le canton de Vaud en Suisse. Composée essentiellement de jeunes, CHARM est… …   Wikipédia en Français

  • Charm++ — Charm++  параллельный объектно ориентированный язык программирования на базе Си++, разработанный в Лаборатории Параллельного Программирования Иллинойсского университета. Charm++ спроектирован с целью повышения эффективности кодирования за… …   Википедия

  • Charm — 〈[tʃa:m] n. 15; Phys.〉 ladungsartige Quantenzahl der Elementarteilchen, vor allem der Quarks, deren Existenz seit 1974 experimentell bestätigt ist * * * Charm [ tʃɑ:m; engl. charm = Charme]; Symbol: c: Phantasiename für eines der Quarks (Charm… …   Universal-Lexikon

  • Charm — Charm, v. t. [imp. & p. p. {Charmed}; p. pr. & vb. n. {Charming}.] [Cf. F. charmer. See {Charm}, n.] 1. To make music upon; to tune. [Obs. & R.] [1913 Webster] Here we our slender pipes may safely charm. Spenser. [1913 Webster] 2. To subdue,… …   The Collaborative International Dictionary of English

  • Charm++ — [1] ist eine parallele objektorientierte Programmiersprache basierend auf C++ und wurde im Parallel Programming Laboratory der University of Illinois entwickelt. Charm++ wurde mit dem Ziel entwickelt, eine höhere Produktivität durch eine höhere… …   Deutsch Wikipedia

  • Charm — (ch[aum]rm), n. [F. charme, fr. L. carmen song, verse, incantation, for casmen, akin to Skr. [,c]asman, [,c]as[=a], a laudatory song, from a root signifying to praise, to sing.] 1. A melody; a song. [Obs.] [1913 Webster] With charm of earliest… …   The Collaborative International Dictionary of English

  • charm — [chärm] n. [ME charme < OFr < L carmen, song, verse, charm < * canmen < canere, to sing: see CHANT] 1. a) a chanted word, phrase, or verse assumed to have magic power to help or hurt; incantation b) the chanting of such a word, phrase …   English World dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”