SST/macro
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sstmac::sw::task_mapper Class Referenceabstract

Base class for strategies regarding how to sequentially number nodes in a parallel simulation. More...

#include <task_mapper.h>

Inheritance diagram for sstmac::sw::task_mapper:
Inheritance graph
Collaboration diagram for sstmac::sw::task_mapper:
Collaboration graph

Public Member Functions

virtual std::string to_string () const
 
virtual void set_topology (hw::topology *top)
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 
virtual ~task_mapper () throw ()
 
virtual void map_ranks (const app_id &aid, const ordered_node_set &allocation, int ppn, std::vector< node_id > &result, int nproc)=0
 Assign processes to nodes. More...
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 
virtual void finalize_init ()
 

Protected Member Functions

 task_mapper (parallel_runtime *rt)
 
int validate_nproc (int ppn, int num_nodes, int nproc, const char *name) const
 

Protected Attributes

hw::topology * topology_
 
parallel_runtimert_
 

Detailed Description

Base class for strategies regarding how to sequentially number nodes in a parallel simulation.

Definition at line 33 of file task_mapper.h.

Constructor & Destructor Documentation

virtual sstmac::sw::task_mapper::~task_mapper ( )
throw (
)
virtual

Referenced by set_topology().

sstmac::sw::task_mapper::task_mapper ( parallel_runtime rt)
inlineprotected

Definition at line 73 of file task_mapper.h.

References validate_nproc().

Here is the call graph for this function:

Member Function Documentation

virtual void sstmac::sw::task_mapper::init_factory_params ( sprockit::sim_parameters *  params)
virtual
virtual void sstmac::sw::task_mapper::map_ranks ( const app_id aid,
const ordered_node_set allocation,
int  ppn,
std::vector< node_id > &  result,
int  nproc 
)
pure virtual

Assign processes to nodes.

Parameters
aidThe application ID for the application whose processes are being indexed
nodesis the set of unique nodes to be used for the allocation
ppnis the nominal number of processes allocated on each node.
resultis the resulting vector of length nodes (size nproc)
nprocthe total number of processes to allocate
Exceptions
value_errorif nodes.empty()
value_errorif ppn <= 0
value_errorif nodes.size()*ppn < nproc

Implemented in sstmac::sw::random_task_mapper, sstmac::sw::dumpi_task_mapper, sstmac::sw::block_task_mapper, sstmac::sw::coordinate_task_mapper, sstmac::sw::round_robin_task_mapper, sstmac::sw::hostname_task_mapper, and sstmac::sw::node_id_task_mapper.

Referenced by set_topology().

virtual void sstmac::sw::task_mapper::set_topology ( hw::topology *  top)
inlinevirtual

Reimplemented in sstmac::sw::dumpi_task_mapper.

Definition at line 44 of file task_mapper.h.

References init_factory_params(), map_ranks(), topology_, and ~task_mapper().

Here is the call graph for this function:

virtual std::string sstmac::sw::task_mapper::to_string ( ) const
inlinevirtual

Definition at line 39 of file task_mapper.h.

int sstmac::sw::task_mapper::validate_nproc ( int  ppn,
int  num_nodes,
int  nproc,
const char *  name 
) const
protected

Referenced by task_mapper().

Member Data Documentation

parallel_runtime* sstmac::sw::task_mapper::rt_
protected

Definition at line 81 of file task_mapper.h.

hw::topology* sstmac::sw::task_mapper::topology_
protected

Definition at line 80 of file task_mapper.h.

Referenced by set_topology().


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