Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsnPvmSvm Class Reference

class encapsulating the PVM virtual machine More...

#include <PsnPvmSvm.h>

Inheritance diagram for PsnPvmSvm:

Inheritance graph
[legend]
Collaboration diagram for PsnPvmSvm:

Collaboration graph
[legend]
List of all members.

Public Methods

 PsnPvmSvm (PsNameToPointerMap< PsnProcess > *tab, const PsDate &latence, int argc, char *argv[])
 constructor

virtual ~PsnPvmSvm ()
 destructor


Static Public Attributes

int pvmDataEncoding
 define the encoding used when sending and receiveing messages

int pvmSpawnFlags
 define the flags used when spawning a new task using PVM


Protected Methods

virtual void joinSvmGroup (string &groupName)
 joinSvmGroup.

virtual void groupBarrier (string groupName, int numberToJoin)
 block the calling process until numberToJoin processes of group groupName have called syncDistributedSites

virtual void broadcastToGroup (string groupName, PsnPvmMessage::MessageTag tag)
 broadcast an empty tagged message to all members of a broadcast group

virtual int nonblockingReceive (PsnPvmMessage::MessageTag tag)
 try and receive message in a non-blocking fashion the received messages are lost

virtual void initBeforeMessagePacking ()
 do any usefull initialisations before messages are packed

virtual pair< PsnPvmMessage::MessageTag,
int > 
waitForAnyRequests (PsnPvmIncomingMessage &receiveBuffer)
 wait for any message sent to this site.

virtual int getSiteId ()
 get the id in the svm of this site

virtual int getParentSiteId ()
 get the site id having spanned this process.

virtual void addNewWorkstation (const PsName &m)
 add a new machine to the virtual machine

virtual void removeWorkstation (const PsName &m)
 remove a work station from the virtual machine

virtual int spawnProcess (PsnProcess *p)
 spawn a copy of this proc'ess on another site

virtual PsnSvmLinkcreateSvmLink (const int &d)
 create a link to a distant site


Protected Attributes

int _argc
 remember the arguments to use when spawning: their number

char ** _argv
 remember the arguments to use when spawning: their contents


Detailed Description

class encapsulating the PVM virtual machine

Author:
Siames
Version:
2.0

Definition at line 31 of file PsnPvmSvm.h.


Constructor & Destructor Documentation

PsnPvmSvm::PsnPvmSvm PsNameToPointerMap< PsnProcess > *    tab,
const PsDate   latence,
int    argc,
char *    argv[]
 

constructor

Parameters:
tab a table containing the a map between a processName and the data structure definig a process
latence the authorized synchronisation latency
argc the number of arguments given at the command line
argv the arguments given at the command line

virtual PsnPvmSvm::~PsnPvmSvm   [virtual]
 

destructor


Member Function Documentation

virtual void PsnPvmSvm::addNewWorkstation const PsName   m [protected, virtual]
 

add a new machine to the virtual machine

Implements PsnSvm.

virtual void PsnPvmSvm::broadcastToGroup string    groupName,
PsnPvmMessage::MessageTag    tag
[protected, virtual]
 

broadcast an empty tagged message to all members of a broadcast group

Implements PsnSvm.

virtual PsnSvmLink* PsnPvmSvm::createSvmLink const int &    d [protected, virtual]
 

create a link to a distant site

Parameters:
d the site id of the distant site

Implements PsnSvm.

virtual int PsnPvmSvm::getParentSiteId   [protected, virtual]
 

get the site id having spanned this process.

Returns:
the site id, 0 meaning the process wasn't spawned by the virtual machine

Implements PsnSvm.

virtual int PsnPvmSvm::getSiteId   [protected, virtual]
 

get the id in the svm of this site

Implements PsnSvm.

virtual void PsnPvmSvm::groupBarrier string    groupName,
int    numberToJoin
[protected, virtual]
 

block the calling process until numberToJoin processes of group groupName have called syncDistributedSites

Parameters:
numberToJoin number of processes to wait for
groupName the name of the process group

Implements PsnSvm.

virtual void PsnPvmSvm::initBeforeMessagePacking   [protected, virtual]
 

do any usefull initialisations before messages are packed

Implements PsnSvm.

virtual void PsnPvmSvm::joinSvmGroup string &    groupName [protected, virtual]
 

joinSvmGroup.

join a group of processes in the siames virtual machine

Parameters:
groupName the name of the group of processes to join. This parameter is not const, because of the underlying C compatibility layer

Implements PsnSvm.

virtual int PsnPvmSvm::nonblockingReceive PsnPvmMessage::MessageTag    tag [protected, virtual]
 

try and receive message in a non-blocking fashion the received messages are lost

Parameters:
tag the tag of the messages to receive
Returns:
number of received messages with that tag

Implements PsnSvm.

virtual void PsnPvmSvm::removeWorkstation const PsName   m [protected, virtual]
 

remove a work station from the virtual machine

Implements PsnSvm.

virtual int PsnPvmSvm::spawnProcess PsnProcess   p [protected, virtual]
 

spawn a copy of this proc'ess on another site

Implements PsnSvm.

virtual pair<PsnPvmMessage::MessageTag, int> PsnPvmSvm::waitForAnyRequests PsnPvmIncomingMessage   receiveBuffer [protected, virtual]
 

wait for any message sent to this site.

This call is blocking

Parameters:
receiveBuffer : the user buffer to use to receive any message a pair giving the tag of the received message and the siteId of the sender

Implements PsnSvm.


Member Data Documentation

int PsnPvmSvm::_argc [protected]
 

remember the arguments to use when spawning: their number

Definition at line 122 of file PsnPvmSvm.h.

char** PsnPvmSvm::_argv [protected]
 

remember the arguments to use when spawning: their contents

Definition at line 126 of file PsnPvmSvm.h.

int PsnPvmSvm::pvmDataEncoding [static]
 

define the encoding used when sending and receiveing messages

Definition at line 113 of file PsnPvmSvm.h.

Referenced by PsnPvmOutgoingMessage::PsnPvmOutgoingMessage(), PsnPvmOutgoingMessage::reinitAndRevertPvmContext(), and PsnSvm::serveNameRequestsUntilEnd().

int PsnPvmSvm::pvmSpawnFlags [static]
 

define the flags used when spawning a new task using PVM

Definition at line 117 of file PsnPvmSvm.h.


The documentation for this class was generated from the following file:
logo OpenMask

Documentation generated on Mon Nov 25 15:26:22 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001