SST/macro
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
sstmac::hw::node Class Referenceabstract

#include <node.h>

Inheritance diagram for sstmac::hw::node:
Inheritance graph
Collaboration diagram for sstmac::hw::node:
Collaboration graph

Public Member Functions

virtual void set_event_manager (event_manager *man)
 Set the eventmanager for this scheduler. More...
 
virtual ~node ()
 
virtual void finalize_init ()
 Standard factory type initializer. More...
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 Standard factory type initializer. More...
 
void set_nic (nic *n)
 Initializer used in stand-alone core. More...
 
void connect (int src_outport, int dst_inport, connection_type_t ty, connectable *mod, config *cfg)
 connect More...
 
memory_modelmem () const
 
nicget_nic () const
 
sw::operating_systemos () const
 
virtual std::string to_string () const
 
node_id addr () const
 
void fail_stop ()
 Cause the node to crash. More...
 
unique_event_id allocate_unique_id ()
 Choose a unique (64-bit) integer ID for a message. More...
 
virtual void execute (ami::COMP_FUNC func, event *data, callback *cb)=0
 Make the node execute a particular compute function. More...
 
virtual void execute (ami::SERVICE_FUNC func, event *data)
 execute Asynchronously execute a kernel on some service associated with the node. More...
 
virtual void handle (event *ev)
 
void send_to_nic (network_message *netmsg)
 Push a network message (operation at the MTL layer) onto the NIC. More...
 
void launch (timestamp start, sw::launch_event *msg)
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 
- Public Member Functions inherited from sstmac::hw::failable
bool failed () const
 
void fail ()
 
- Public Member Functions inherited from sstmac::event_scheduler
virtual ~event_scheduler ()
 
void cancel_all_messages ()
 
void ipc_schedule (timestamp t, event_handler *handler, event *ev)
 ipc_schedule Should only be called on stub handlers for which handler->ipc_handler() returns true More...
 
void schedule (timestamp t, event_handler *handler, event *ev)
 Add an event to the event queue, where msg will get delivered to handler at time t. More...
 
void schedule (timestamp t, event_queue_entry *ev)
 
void schedule_now (event_queue_entry *ev)
 
void schedule_now (event_handler *handler, event *ev)
 
void schedule_delay (timestamp delay, event_handler *handler, event *ev)
 
void schedule_delay (timestamp delay, event_queue_entry *ev)
 
void send_self_event (timestamp arrival, event *ev)
 
void send_delayed_self_event (timestamp delay, event *ev)
 
void send_now_self_event (event *ev)
 
void send_self_event_queue (timestamp arrival, event_queue_entry *ev)
 
void send_delayed_self_event_queue (timestamp delay, event_queue_entry *ev)
 
void send_now_self_event_queue (event_queue_entry *ev)
 
void register_stat (stat_collector *coll)
 
event_managerevent_mgr () const
 
timestamp now () const
 get the current time More...
 
int nthread () const
 
- Public Member Functions inherited from sstmac::event_handler
virtual ~event_handler ()
 
event_loc_id event_location () const
 
virtual bool ipc_handler () const
 Whether an event handler is a "fake" handler that represents logical process boundary. More...
 
int thread_id () const
 
virtual void deadlock_check (event *ev)
 
virtual void deadlock_check ()
 

Protected Member Functions

 node ()
 
void connect_nic ()
 
- Protected Member Functions inherited from sstmac::hw::failable
 failable ()
 
- Protected Member Functions inherited from sstmac::event_scheduler
 event_scheduler ()
 
- Protected Member Functions inherited from sstmac::event_handler
 event_handler ()
 
void init_loc_id (event_loc_id id)
 
void init_thread_id (int id)
 

Protected Attributes

sw::app_launchenv_
 
sw::operating_systemos_
 
node_id my_addr_
 
memory_modelmem_model_
 
processorproc_
 
nicnic_
 
int ncores_
 
int nsocket_
 
- Protected Attributes inherited from sstmac::hw::failable
bool failed_
 
- Protected Attributes inherited from sstmac::event_scheduler
uint32_t seqnum_
 

Private Member Functions

void build_launchers (sprockit::sim_parameters *params)
 

Private Attributes

std::list< sw::launch_event * > launchers_
 
unique_event_id next_outgoing_id_
 

Additional Inherited Members

- Public Types inherited from sstmac::hw::connectable
enum  config_type_t {
  RedundantConnection =0, WeightedConnection =1, FixedBandwidthConnection =2, FixedConnection =3,
  BasicConnection =4
}
 
enum  connection_type_t { output, input }
 
- Static Public Member Functions inherited from sstmac::hw::connectable
static const char * str (connection_type_t ty)
 
- Static Public Attributes inherited from sstmac::event_handler
static const int null_lpid = -1
 
static const int null_threadid = -1
 
- Static Public Attributes inherited from sstmac::hw::connectable
static const int any_port = -1
 

Detailed Description

Definition at line 43 of file node.h.

Constructor & Destructor Documentation

virtual sstmac::hw::node::~node ( )
virtual
sstmac::hw::node::node ( )
protected

Referenced by allocate_unique_id().

Member Function Documentation

node_id sstmac::hw::node::addr ( ) const
inline
Returns
A unique integer identifier

Definition at line 127 of file node.h.

References fail_stop(), and my_addr_.

Here is the call graph for this function:

unique_event_id sstmac::hw::node::allocate_unique_id ( )
inline

Choose a unique (64-bit) integer ID for a message.

This will never be reused except for integer overflow.

Returns
A unique 64-bit integer

Definition at line 142 of file node.h.

References connect_nic(), execute(), handle(), next_outgoing_id_, node(), and send_to_nic().

Here is the call graph for this function:

void sstmac::hw::node::build_launchers ( sprockit::sim_parameters *  params)
private
void sstmac::hw::node::connect ( int  src_outport,
int  dst_inport,
connection_type_t  ty,
connectable mod,
config cfg 
)
virtual

connect

Parameters
src_outportThe outgoing port at the source
dst_inportThe incoming port at the destination
tyWhether we are configuring the input or output direction
modThe device currently being connected
cfgA struct with various special configuration options

Implements sstmac::hw::connectable.

Referenced by set_nic().

void sstmac::hw::node::connect_nic ( )
protected

Referenced by allocate_unique_id().

virtual void sstmac::hw::node::execute ( ami::COMP_FUNC  func,
event data,
callback cb 
)
pure virtual

Make the node execute a particular compute function.

This generally causes the function to be executed immediately.

Parameters
funcEnum identifying the type of computation
dataEvent object encapsulating data/metadata for computation
cbThe event to execute when kernel is complete

Implemented in sstmac::hw::simple_node.

Referenced by allocate_unique_id().

virtual void sstmac::hw::node::execute ( ami::SERVICE_FUNC  func,
event data 
)
virtual

execute Asynchronously execute a kernel on some service associated with the node.

This generally enqueues an operation to be performed - not necessarily executing it immediately.

Parameters
func
data
void sstmac::hw::node::fail_stop ( )

Cause the node to crash.

This cancels all future events for this node.

Referenced by addr().

virtual void sstmac::hw::node::finalize_init ( )
virtual

Standard factory type initializer.

Perform extra initialization work after all parameters have been read in.

Reimplemented from sprockit::factory_type.

Reimplemented in sstmac::hw::simple_node.

nic* sstmac::hw::node::get_nic ( ) const
inline
Returns
A handler wrapper for scheduling events to the NIC

Definition at line 105 of file node.h.

References nic_.

virtual void sstmac::hw::node::handle ( event ev)
virtual

Reimplemented from sstmac::event_scheduler.

Referenced by allocate_unique_id().

virtual void sstmac::hw::node::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Standard factory type initializer.

Read in all parameters. The parameter object

Reimplemented in sstmac::hw::simple_node, and sstmac::hw::null_node.

void sstmac::hw::node::launch ( timestamp  start,
sw::launch_event msg 
)
memory_model* sstmac::hw::node::mem ( ) const
inline
Returns
The object encapsulating the memory model

Definition at line 97 of file node.h.

References mem_model_.

sw::operating_system* sstmac::hw::node::os ( ) const
inline
Returns
The operating system managing apps on this node

Definition at line 113 of file node.h.

References os_, and to_string().

Here is the call graph for this function:

void sstmac::hw::node::send_to_nic ( network_message netmsg)

Push a network message (operation at the MTL layer) onto the NIC.

Parameters
netmsg

Referenced by allocate_unique_id().

virtual void sstmac::hw::node::set_event_manager ( event_manager m)
virtual

Set the eventmanager for this scheduler.

Unfortunately, this always has to be called after an event_scheduler is constructed.

Parameters
mthe simulation eventmanager

Reimplemented from sstmac::event_scheduler.

Reimplemented in sstmac::hw::simple_node.

void sstmac::hw::node::set_nic ( nic n)
inline

Initializer used in stand-alone core.

Parameters
nThe network interface object

Definition at line 84 of file node.h.

References connect(), and nic_.

Here is the call graph for this function:

virtual std::string sstmac::hw::node::to_string ( ) const
virtual
Returns
A unique string description of the node

Reimplemented from sstmac::event_scheduler.

Referenced by os().

Member Data Documentation

sw::app_launch* sstmac::hw::node::env_
protected

Definition at line 184 of file node.h.

std::list<sw::launch_event*> sstmac::hw::node::launchers_
private

Definition at line 204 of file node.h.

memory_model* sstmac::hw::node::mem_model_
protected

Definition at line 190 of file node.h.

Referenced by mem().

node_id sstmac::hw::node::my_addr_
protected

Definition at line 188 of file node.h.

Referenced by addr().

int sstmac::hw::node::ncores_
protected

Definition at line 196 of file node.h.

unique_event_id sstmac::hw::node::next_outgoing_id_
private

Definition at line 205 of file node.h.

Referenced by allocate_unique_id().

nic* sstmac::hw::node::nic_
protected

Definition at line 194 of file node.h.

Referenced by get_nic(), and set_nic().

int sstmac::hw::node::nsocket_
protected

Definition at line 198 of file node.h.

sw::operating_system* sstmac::hw::node::os_
protected

Definition at line 186 of file node.h.

Referenced by os().

processor* sstmac::hw::node::proc_
protected

Definition at line 192 of file node.h.


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