Ceci est une ancienne révision du document !


CHARM++

From Wikipedia, the free encyclopedia

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.

Utilisation

Il faut tout d'abord charger les modules nécessaires :

module load ompi charm++

Accès aux commandes telles que : charmc et charmrun

Exemple : HelloWorld

** Interface**

main.c
mainmodule main {
 
  readonly CProxy_Main mainProxy;
  readonly int numElements;
 
  extern module hello;
 
  mainchare Main {
    entry Main(CkArgMsg* msg);
    entry void done();
  };
 
};

Header file

main.h
#ifndef __MAIN_H__
#define __MAIN_H__
 
class Main : public CBase_Main {
 
 public:
 
  /// Constructors ///
  Main(CkArgMsg* msg);
  Main(CkMigrateMessage* msg);
 
  /// Entry Methods ///
  void done();
};
 
#endif //__MAIN_H__ 

Liens

  • charm.1325780951.txt.gz
  • Dernière modification : 2015/02/25 08:45
  • (modification externe)