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

An index strategy that allocates indices using a round robin. More...

#include <random_task_mapper.h>

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

Public Member Functions

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

Protected Attributes

RNG::UniformIntegerrng_
 
- Protected Attributes inherited from sstmac::sw::task_mapper
hw::topology * topology_
 
parallel_runtimert_
 

Additional Inherited Members

- Protected Member Functions inherited from sstmac::sw::task_mapper
 task_mapper (parallel_runtime *rt)
 
int validate_nproc (int ppn, int num_nodes, int nproc, const char *name) const
 

Detailed Description

An index strategy that allocates indices using a round robin.

Definition at line 24 of file random_task_mapper.h.

Constructor & Destructor Documentation

sstmac::sw::random_task_mapper::random_task_mapper ( parallel_runtime rt)
inline

Definition at line 28 of file random_task_mapper.h.

References init_factory_params(), map_ranks(), and ~random_task_mapper().

Here is the call graph for this function:

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

Referenced by random_task_mapper().

Member Function Documentation

virtual void sstmac::sw::random_task_mapper::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Reimplemented from sstmac::sw::task_mapper.

Referenced by random_task_mapper().

virtual void sstmac::sw::random_task_mapper::map_ranks ( const app_id aid,
const ordered_node_set allocation,
int  ppn,
std::vector< node_id > &  result,
int  nproc 
)
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

Implements sstmac::sw::task_mapper.

Referenced by random_task_mapper().

Member Data Documentation

RNG::UniformInteger* sstmac::sw::random_task_mapper::rng_
protected

Definition at line 46 of file random_task_mapper.h.


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