DistributedMultiThreadNetwork Class Reference

Network which encapsulates a distributed multi-threaded simulation. More...

#include <DistributedMultiThreadNetwork.h>

Inheritance diagram for DistributedMultiThreadNetwork:

Inheritance graph
[legend]
Collaboration diagram for DistributedMultiThreadNetwork:

Collaboration graph
[legend]

List of all members.

Messages

virtual void _addAnalogMessage_ (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, int recv_port, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, string destfield, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, int recv_port, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, string destfield, const Time &delay)
virtual gl_engineid_t maxLocalEngineID (void) const
 Return the largest local simulation engine ID at the executing node.
template<typename analogSrcType, typename analogDestType>
void addGenericAnalogMessage (const SimObject::ID &sender, analogSrcType srcPortOrField, const SimObject::ID &receiver, analogDestType destPortOrField, delay_t delay)

Public Member Functions

 DistributedMultiThreadNetwork (int numThreads, SimParameter sp=SimParameter::Default)
 Constructor assuming MPI::COMM_WORLD for communicator (for python interface).
 DistributedMultiThreadNetwork (int numThreads, MPI::Intracomm &mpiCommunicator, SimParameter sp=SimParameter::Default)
 Constructor.
virtual ~DistributedMultiThreadNetwork ()

Protected Member Functions

virtual void _reset_ ()
 Resets the simulation.
virtual void _advance_ (int nSteps=1)
 Advances the simulation of the network for a specified number of simulation timesteps.
virtual void _initialize_ ()
 Initialize the network for forthcoming simulation. Should be called after construction and before simulation.
void init ()
 Auxiliary method used for constructing the network, allowing multiple constructors.
virtual void _addSpikeMessage_ (const SimObject::ID &sender, const port_t out, const spike_port_id_t sender_port, const SimObject::ID &receiver, const port_t port, const step_t delay)
Getting acces to objects
virtual SimObject_getObject_ (const SimObject::ID &id)

Protected Attributes

int nThreads
 Number of threads the network utilizes on the local node.
MTDistributedIncomingSpikeSchedulerdistIncomingSpikeScheduler
 Distributed incoming spike scheduler used for processing the incoming spikes from other nodes.
DistributedSpikeSchedulerspikeScheduler
 Spike scheduler used for scheduling the outgoing spikes originating from the local node, and delivering spikes to destination sim objects.
GlobalMultiTargetDelayMapglobalDelayMap
 A inter-node spike routing table used for scheduling incoming spikes from other nodes.
TargetNodesMaptargetNodesMap
 Spike routing table used for routing the spikes originating from the local processing node to other target nodes.
MPIAllToAllCommunicatormpiAllToAllComm
 Object that encapsulates the all to all exchange algorithm of mpi spike buffers.
MPIOutputBufferVectormpiOutBuffers
 MPI storage buffer for outgoing spikes occuring in the local node, which need to be communicated to other target nodes.
MPIInputBufferVectormpiInBuffers
 MPI Input buffer holding the arrived spikes from other nodes after complete exchange.
MTSpikeRoutingTablesmtTables
 Tables used for spike routing just for local multi-threaded spike exchange.
ThreadPool thrPool
 ThreadPool holding thread objects used in multi-thread processing.
vector< PropagatedSpikeBuffer * > STBuffers
 Array of Propagated spike buffers, one for each SingleThreadSimEngine.
MultiThreadSpikeSchedulerlocalSpikeScheduler
 Spike scheduler used for scheduling local spikes (spikes originating and terminating in the same node).
AnalogDelayObjectMapanalogDelayObjectsMap
vector
< MultiThreadAnalogMsgDispatcher * > 
mTanalogMsgDispatchers
vector
< DistributedAnalogMessageDispatcher * > 
distAnalogMsgDispatchers
MTDistributedCycledAnalogMsgDispatchermtDistCycledAnalogMsgDispatcher
vector< STAnalogMessageCreator * > stAnalogMsgCreators
MTAnalogMessageCreatormtAnalogMsgCreator
vector
< DistributedAnalogMessageCreator * > 
distAnalogMessageCreators
vector< vector
< DistributedIncomingAnalogMsgDispatcher * > > 
incomingDispatchers
vector
< DistIncomingAnalogSources2BufPosMap * > 
sources2BufPositionsMaps
vector< vector
< DistributedOutgoingAnalogMsgDispatcher * > > 
outgoingDispatchers

Friends

class NoiseRandomEngineTest


Detailed Description

Network which encapsulates a distributed multi-threaded simulation.

Network class used for setup and running simulations on many multi-processor machines (distributed multi-thread scenario). Contains interfaces for construction of the network, i.e. adding SimObject objects (neurons, synapses, etc.) and connecting them, and for simulation control.

See also:
DistributedNetwork, SimNetwork

Definition at line 39 of file DistributedMultiThreadNetwork.h.


Constructor & Destructor Documentation

DistributedMultiThreadNetwork::DistributedMultiThreadNetwork ( int  numThreads,
SimParameter  sp = SimParameter::Default 
)

Constructor assuming MPI::COMM_WORLD for communicator (for python interface).

Definition at line 21 of file DistributedMultiThreadNetwork.cpp.

References init().

Here is the call graph for this function:

DistributedMultiThreadNetwork::DistributedMultiThreadNetwork ( int  numThreads,
MPI::Intracomm &  mpiCommunicator,
SimParameter  sp = SimParameter::Default 
)

Constructor.

Constructs a distributed multi-thread (DMT) network object on the local node with specified number of threads, which connects to other DMT network objects on other nodes wiht MPI to perform multi-node simulation.

Parameters:
nThreads number of threads the local node uses (on each machine different number of threads may be specified)
simPar SimParameter structure which contains global simulation parameters like dt and the minimal synaptic delay
mpiCommunicator the mpi communicator which is used for distributed spike exchange.

Definition at line 27 of file DistributedMultiThreadNetwork.cpp.

References init().

Here is the call graph for this function:

DistributedMultiThreadNetwork::~DistributedMultiThreadNetwork (  )  [virtual]


Member Function Documentation

void DistributedMultiThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [virtual]

Reimplemented from SimNetwork.

Definition at line 324 of file DistributedMultiThreadNetwork.cpp.

References addGenericAnalogMessage(), SimParameter::dt, Time::in_steps(), and SimNetwork::simParam.

Here is the call graph for this function:

void DistributedMultiThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [virtual]

Reimplemented from SimNetwork.

Definition at line 330 of file DistributedMultiThreadNetwork.cpp.

References addGenericAnalogMessage(), SimParameter::dt, Time::in_steps(), and SimNetwork::simParam.

Here is the call graph for this function:

void DistributedMultiThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [virtual]

Reimplemented from SimNetwork.

Definition at line 336 of file DistributedMultiThreadNetwork.cpp.

References addGenericAnalogMessage(), SimParameter::dt, Time::in_steps(), and SimNetwork::simParam.

Here is the call graph for this function:

void DistributedMultiThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [virtual]

Reimplemented from SimNetwork.

Definition at line 342 of file DistributedMultiThreadNetwork.cpp.

References addGenericAnalogMessage(), SimParameter::dt, Time::in_steps(), and SimNetwork::simParam.

Here is the call graph for this function:

gl_engineid_t DistributedMultiThreadNetwork::maxLocalEngineID ( void   )  const [virtual]

Return the largest local simulation engine ID at the executing node.

Reimplemented from DistributedNetwork.

Definition at line 351 of file DistributedMultiThreadNetwork.cpp.

References nThreads.

template<typename analogSrcType, typename analogDestType>
void DistributedMultiThreadNetwork::addGenericAnalogMessage ( const SimObject::ID sender,
analogSrcType  srcPortOrField,
const SimObject::ID receiver,
analogDestType  destPortOrField,
delay_t  delay 
) [inline, protected]

void DistributedMultiThreadNetwork::_reset_ (  )  [protected, virtual]

Resets the simulation.

Resets the simulation to time = 0. Discardes the pending spikes and reinitalizes the states of the sim objects.

Reimplemented from SimNetwork.

Definition at line 369 of file DistributedMultiThreadNetwork.cpp.

References distAnalogMsgDispatchers, DistributedNetwork::distEngine, SimNetwork::get_dt(), SimNetwork::initialize(), SimNetwork::initialized, mpiOutBuffers, MPIOutputBufferVector::nextCycle(), nThreads, DistributedSimEngine::reset(), DistributedSpikeScheduler::reset(), SimNetwork::reseted, and spikeScheduler.

Here is the call graph for this function:

void DistributedMultiThreadNetwork::_advance_ ( int  nSteps = 1  )  [protected, virtual]

Advances the simulation of the network for a specified number of simulation timesteps.

Advancing continues from exactly where the simulation from the previous advance() invocation stopped. reset() should be used to restart the simulation of the network from time = 0.

Parameters:
nSteps number of timesteps the simulation is advanced.

Reimplemented from SimNetwork.

Definition at line 382 of file DistributedMultiThreadNetwork.cpp.

References DistributedSimEngine::advance(), DistributedNetwork::distEngine, SimNetwork::reset(), and SimNetwork::reseted.

Here is the call graph for this function:

void DistributedMultiThreadNetwork::_initialize_ (  )  [protected, virtual]

SimObject * DistributedMultiThreadNetwork::_getObject_ ( const SimObject::ID id  )  [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 206 of file DistributedMultiThreadNetwork.cpp.

References SimEngine::getObject(), DistributedNetwork::localSimEngine, and DistributedNetwork::mpi_comm.

Here is the call graph for this function:

void DistributedMultiThreadNetwork::init (  )  [protected]

void DistributedMultiThreadNetwork::_addSpikeMessage_ ( const SimObject::ID sender,
const port_t  out,
const spike_port_id_t  sender_port,
const SimObject::ID receiver,
const port_t  port,
const step_t  delay 
) [protected, virtual]


Friends And Related Function Documentation

friend class NoiseRandomEngineTest [friend]

Reimplemented from SimNetwork.

Definition at line 196 of file DistributedMultiThreadNetwork.h.


Member Data Documentation

Number of threads the network utilizes on the local node.

Definition at line 107 of file DistributedMultiThreadNetwork.h.

Referenced by _initialize_(), _reset_(), init(), maxLocalEngineID(), and ~DistributedMultiThreadNetwork().

Distributed incoming spike scheduler used for processing the incoming spikes from other nodes.

Definition at line 110 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Spike scheduler used for scheduling the outgoing spikes originating from the local node, and delivering spikes to destination sim objects.

Definition at line 113 of file DistributedMultiThreadNetwork.h.

Referenced by _reset_(), init(), and ~DistributedMultiThreadNetwork().

A inter-node spike routing table used for scheduling incoming spikes from other nodes.

For each source spike emiting object, the map returns the target groups of objects which are destination for the spikes from the source, and their associated delays. Used by distributed incoming spike scheduler to schedule incoming spikes to propagated spike buffers.

Definition at line 121 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Spike routing table used for routing the spikes originating from the local processing node to other target nodes.

Used by the DistributedSpikeScheduler to acquire the target nodes to which some generated spike should be sent via MPI.

Definition at line 128 of file DistributedMultiThreadNetwork.h.

Referenced by _addSpikeMessage_(), init(), and ~DistributedMultiThreadNetwork().

Object that encapsulates the all to all exchange algorithm of mpi spike buffers.

Definition at line 131 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

MPI storage buffer for outgoing spikes occuring in the local node, which need to be communicated to other target nodes.

The buffers is filled by DistributedSpikeScheduler and then used by MPIAllToAllCommunicator to send the buffers to appropriate nodes.

Definition at line 137 of file DistributedMultiThreadNetwork.h.

Referenced by _initialize_(), _reset_(), init(), and ~DistributedMultiThreadNetwork().

MPI Input buffer holding the arrived spikes from other nodes after complete exchange.

mpiInputBuffers hold the transferred MPI buffers after complete exchange, one for each node.

Definition at line 143 of file DistributedMultiThreadNetwork.h.

Referenced by _initialize_(), init(), and ~DistributedMultiThreadNetwork().

Tables used for spike routing just for local multi-threaded spike exchange.

Definition at line 146 of file DistributedMultiThreadNetwork.h.

Referenced by _addSpikeMessage_(), init(), and ~DistributedMultiThreadNetwork().

ThreadPool holding thread objects used in multi-thread processing.

Definition at line 149 of file DistributedMultiThreadNetwork.h.

Referenced by init().

Array of Propagated spike buffers, one for each SingleThreadSimEngine.

Definition at line 152 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Spike scheduler used for scheduling local spikes (spikes originating and terminating in the same node).

A member of DistributedSpikeScheduler. Distributed spike scheduler delegates the local spike scheduling to it.

Definition at line 158 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Definition at line 164 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Definition at line 166 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Definition at line 170 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Definition at line 178 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Definition at line 180 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().

Definition at line 182 of file DistributedMultiThreadNetwork.h.

Referenced by init(), and ~DistributedMultiThreadNetwork().


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