DistributedSimEngine Class Reference

Simulation Engine for a distributed simulation. More...

#include <DistributedSimEngine.h>

Inheritance diagram for DistributedSimEngine:

Inheritance graph
[legend]
Collaboration diagram for DistributedSimEngine:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DistributedSimEngine (SimEngine &localEngine, DistributedIncomingSpikeScheduler &incomingScheduler, SpikeScheduler &spikeScheduler, DistributedCycledAnalogMsgDispatcher &distCycledAnalogMsgDispatcher, MPIAllToAllCommunicator &mpiCommunicator, SimNetwork &net)
 Constructs a DistributedSimEngine.
virtual ~DistributedSimEngine ()
virtual void advance (int numSteps=1)
 advances the engine for a specified number of simulation timesteps.
virtual void advanceOneFullCycle ()
 Advances only one simulation cycle (one cycle is consisted of several number of steps usualy equal to minimum synapse delay).
virtual void advanceSeveralStepsWithinACycle (int nsteps)
virtual void finalizeCycle ()
virtual void reset ()
 resets the simulation, and returns the simulation clock to time = 0.
virtual void addObject (SimObjectFactory const &objFactory, SimObject::ID &id)
 Adds an advancable object to be advanced by the engine.
virtual void mount (const SimObjectFactory &objFactory, const SimObject::ID &mountpoint, SimObject::ID &gid)
virtual void insert (const SimObjectFactory &objFactory, const SimObject::ID &mountpoint, SimObject::ID &gid)
virtual SimObjectgetObject (const SimObject::ID &id)
 Gets a pointer of a previously stored sim object in the simulation engine.
virtual void initialize ()
 Initializes the engine and all the objects it contains, so that they are ready for simulation.
virtual void seed (vector< uint32 > const &noiseSeed)
virtual void seed (uint32 noiseSeed)

Protected Attributes

SimEnginelocalEng
 The local simulation engine used.
DistributedIncomingSpikeSchedulerinScheduler
 incoming spike scheduler used for scheduling spikes arriving through mpi from other nodes.
MPIAllToAllCommunicator_mpiCommunicator
 Has the responsibility to perform all-to-all exchange of mpi spike buffers.
DistributedCycledAnalogMsgDispatcherdistCycledAnalogMsgDispatcher
 analog message dispatcher
int currentStepWithinCycle


Detailed Description

Simulation Engine for a distributed simulation.

The DistributedSimEngine augments a localSimEngine to be able to perform also distributed spike scheduling, i.e. distributed simulation runniing.

Apart from advancing the local simulation engine, it also controls the distributed incoming spike scheduler and All-To-All spike exchange object.

See also:
SingleThreadSimEngine, MultiThreadSimEngine

Definition at line 24 of file DistributedSimEngine.h.


Constructor & Destructor Documentation

DistributedSimEngine::DistributedSimEngine ( SimEngine localEngine,
DistributedIncomingSpikeScheduler incomingScheduler,
SpikeScheduler spikeScheduler,
DistributedCycledAnalogMsgDispatcher distCycledAnalogMsgDispatcher,
MPIAllToAllCommunicator mpiCommunicator,
SimNetwork net 
)

Constructs a DistributedSimEngine.

Parameters:
localEngine The local simulation engine to be used for local simulation.
incomingScheduler distributed incoming spike scheduler used for incoming spike scheduling.
mpiCommunicator object that performs the all to all exchange algorithm each simulation timestep.
sp holds the common parameters of the simulation.

Definition at line 10 of file DistributedSimEngine.cpp.

References currentStepWithinCycle.

DistributedSimEngine::~DistributedSimEngine (  )  [virtual]

Definition at line 22 of file DistributedSimEngine.cpp.


Member Function Documentation

void DistributedSimEngine::advance ( int  numSteps = 1  )  [virtual]

void DistributedSimEngine::advanceOneFullCycle (  )  [virtual]

Advances only one simulation cycle (one cycle is consisted of several number of steps usualy equal to minimum synapse delay).

Implements SimEngine.

Definition at line 88 of file DistributedSimEngine.cpp.

References _mpiCommunicator, SimEngine::advanceOneFullCycle(), DistributedCycledAnalogMsgDispatcher::dispatchDelayerCycledIncomingAnalogMsgs(), distCycledAnalogMsgDispatcher, MPIAllToAllCommunicator::doAllToAllExchange(), inScheduler, localEng, and DistributedIncomingSpikeScheduler::processMPIInputSpikeBuffers().

Here is the call graph for this function:

void DistributedSimEngine::advanceSeveralStepsWithinACycle ( int  nsteps  )  [virtual]

Implements SimEngine.

Definition at line 83 of file DistributedSimEngine.cpp.

References SimEngine::advanceSeveralStepsWithinACycle(), and localEng.

Here is the call graph for this function:

void DistributedSimEngine::finalizeCycle (  )  [virtual]

void DistributedSimEngine::reset (  )  [virtual]

resets the simulation, and returns the simulation clock to time = 0.

Implements SimEngine.

Definition at line 112 of file DistributedSimEngine.cpp.

References currentStepWithinCycle, localEng, and SimEngine::reset().

Referenced by DistributedSingleThreadNetwork::_reset_(), and DistributedMultiThreadNetwork::_reset_().

Here is the call graph for this function:

void DistributedSimEngine::addObject ( SimObjectFactory const &  objFactory,
SimObject::ID id 
) [virtual]

Adds an advancable object to be advanced by the engine.

Implements SimEngine.

Definition at line 123 of file DistributedSimEngine.cpp.

References SimEngine::addObject(), and localEng.

Here is the call graph for this function:

void DistributedSimEngine::mount ( const SimObjectFactory objFactory,
const SimObject::ID mountpoint,
SimObject::ID gid 
) [virtual]

Implements SimEngine.

Definition at line 128 of file DistributedSimEngine.cpp.

References localEng, and SimEngine::mount().

Here is the call graph for this function:

void DistributedSimEngine::insert ( const SimObjectFactory objFactory,
const SimObject::ID mountpoint,
SimObject::ID gid 
) [virtual]

Implements SimEngine.

Definition at line 133 of file DistributedSimEngine.cpp.

References SimEngine::insert(), and localEng.

Here is the call graph for this function:

SimObject * DistributedSimEngine::getObject ( const SimObject::ID id  )  [virtual]

Gets a pointer of a previously stored sim object in the simulation engine.

Implements SimEngine.

Definition at line 138 of file DistributedSimEngine.cpp.

References SimEngine::getObject(), and localEng.

Here is the call graph for this function:

void DistributedSimEngine::initialize (  )  [virtual]

Initializes the engine and all the objects it contains, so that they are ready for simulation.

Includes reset() operation inside.

Implements SimEngine.

Definition at line 118 of file DistributedSimEngine.cpp.

References SimEngine::initialize(), and localEng.

Here is the call graph for this function:

virtual void DistributedSimEngine::seed ( vector< uint32 > const &  noiseSeed  )  [inline, virtual]

Implements SimEngine.

Definition at line 73 of file DistributedSimEngine.h.

virtual void DistributedSimEngine::seed ( uint32  noiseSeed  )  [inline, virtual]

Implements SimEngine.

Definition at line 74 of file DistributedSimEngine.h.


Member Data Documentation

The local simulation engine used.

The distributed sim engine builds on the functionality of the local engine by adding features for distributed spike scheduling (incoming spike scheduling and all-to-all mpi spike buffer exchange)

Definition at line 74 of file DistributedSimEngine.h.

Referenced by addObject(), advance(), advanceOneFullCycle(), advanceSeveralStepsWithinACycle(), finalizeCycle(), getObject(), initialize(), insert(), mount(), and reset().

incoming spike scheduler used for scheduling spikes arriving through mpi from other nodes.

Definition at line 87 of file DistributedSimEngine.h.

Referenced by advance(), advanceOneFullCycle(), and finalizeCycle().

Has the responsibility to perform all-to-all exchange of mpi spike buffers.

Definition at line 90 of file DistributedSimEngine.h.

Referenced by advance(), advanceOneFullCycle(), and finalizeCycle().

analog message dispatcher

Definition at line 93 of file DistributedSimEngine.h.

Referenced by advance(), advanceOneFullCycle(), and finalizeCycle().

Definition at line 96 of file DistributedSimEngine.h.

Referenced by advance(), DistributedSimEngine(), and reset().


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

Generated on Wed Jul 9 16:34:47 2008 for PCSIM by  doxygen 1.5.5