PPL Logo

OneTimeMulticastStrategy Class Reference
[Strategies for use in Charm++]

The simplest multicast strategy. More...

#include <OneTimeMulticastStrategy.h>

Inheritance diagram for OneTimeMulticastStrategy:

Inheritance graph
[legend]
Collaboration diagram for OneTimeMulticastStrategy:

Collaboration graph
[legend]

Public Member Functions

virtual void determineNextHopPEs (const int totalDestPEs, const ComlibMulticastIndexCount *destPEs, const int myIndex, const int rootPE, int *&pelist, int &npes)
 Determine the set of PEs to which the message should be forwarded from this PE.
 OneTimeMulticastStrategy (CkMigrateMessage *m)
 OneTimeMulticastStrategy ()
 ~OneTimeMulticastStrategy ()
void insertMessage (MessageHolder *msg)
 Called for each message.
void insertMessage (CharmMessageHolder *msg)
 Called when the user invokes the entry method on the delegated proxy.
void handleMessage (void *msg)
 Called by the converse handler function.
void pup (PUP::er &p)
 PUPable_decl (OneTimeMulticastStrategy)

Private Member Functions

void remoteMulticast (ComlibMulticastMsg *multMsg, bool rootPE)
 Forward multicast message to our successor processors in the spanning tree.
void localMulticast (CharmMessageHolder *cmsg)
 Deliver the message to the local elements.

Private Attributes

ComlibSectionInfo sinfo

Detailed Description

The simplest multicast strategy.

This strategy extracts the array section information, and packs the section information and the user message into a single message. The original message is delivered locally, and the new message is sent using CmiSyncListSendAndFree to all other processors containing destination objects. If the destination entry method is [nokeep], then the multicast is delivered inline without extra copies to the local destination elements. If the destination is not [nokeep], then the message is delivered through the scheduler queue.

Projections can trace the messages for the [nokeep] destinations, but the sending entry method will end prematurely because inline calling of local entry methods is not fully supported by Projections. Messages multicast to non [nokeep] methods are displayed incorrectly, probably because the call to deliver overwrites the source pe & event.

Fix projections logging for the non [nokeep] version

This strategy is simpler than those which are derived from the MulticastStrategy class because those maintain a persistant record of previous array section information extracted from the messages, and those provide multiple implementations of the multicast tree (such as ring or multiring or all to all). Those strategies ought to be used when multiple multicasts are sent to the same array section. If an array section is not reused, then this strategy ought to be used.

A class can be created which inherits from this class, but provides its own determineNextHopPEs method to specify any type of desired spanning tree. For example, OneTimeRingMulticastStrategy forwards the multicast messages in a ring while OneTimeTreeMulticastStrategy forwards messages along a tree of specified degree. In the future, topology aware (both network and core/cpu/node) strategies should be added.

The local messages are delivered through the array manager using the CharmStrategy::deliverToIndices methods. If a destination chare is remote, the array manager will forward it on to the pe that contains the chare.

To create a new strategy:

Todo:
Buffer messages until strategy is fully enabled. The current version might have some startup issues if the multicast is used too early.
Todo:
Implement topology aware subclasses.

Definition at line 40 of file OneTimeMulticastStrategy.h.


Constructor & Destructor Documentation

OneTimeMulticastStrategy::OneTimeMulticastStrategy ( CkMigrateMessage m  )  [inline]

Definition at line 65 of file OneTimeMulticastStrategy.h.


Member Function Documentation

void OneTimeMulticastStrategy::insertMessage ( MessageHolder msg  )  [inline, virtual]

Called for each message.

Implements Strategy.

Definition at line 70 of file OneTimeMulticastStrategy.h.

OneTimeMulticastStrategy::PUPable_decl ( OneTimeMulticastStrategy   ) 


Field Documentation

Definition at line 43 of file OneTimeMulticastStrategy.h.

Referenced by handleMessage(), insertMessage(), and localMulticast().


The documentation for this class was generated from the following files:

Generated on Fri May 25 08:04:36 2012 for Charm++ by  doxygen 1.5.5