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

#include <hostname_allocation.h>

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

Public Types

typedef spkt_unordered_map< std::string, node_idnodemap_t
 

Public Member Functions

 hostname_allocation (parallel_runtime *rt)
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 
virtual void allocate (int nnode_requested, const ordered_node_set &available, ordered_node_set &allocation) const
 Get nodes. More...
 
virtual ~hostname_allocation () throw ()
 
- Public Member Functions inherited from sstmac::sw::node_allocator
void set_topology (hw::topology *top)
 
virtual std::string to_string () const
 
virtual ~node_allocator () throw ()
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 
virtual void finalize_init ()
 

Static Public Member Functions

static void read_map_file (parallel_runtime *rt, const char *here, const std::string &mapfile, std::map< std::string, std::vector< int > > &hostmap)
 This function reads in a map file for mapping host names to network coordinates. More...
 

Static Public Attributes

static nodemap_t hostnamemap_
 
static std::map< long, std::string > nodenum_to_host_map_
 

Protected Attributes

std::string mapfile_
 
- Protected Attributes inherited from sstmac::sw::node_allocator
hw::topology * topology_
 
parallel_runtimert_
 

Additional Inherited Members

- Protected Member Functions inherited from sstmac::sw::node_allocator
 node_allocator (parallel_runtime *rt)
 

Detailed Description

Definition at line 23 of file hostname_allocation.h.

Member Typedef Documentation

typedef spkt_unordered_map<std::string, node_id> sstmac::sw::hostname_allocation::nodemap_t

Definition at line 54 of file hostname_allocation.h.

Constructor & Destructor Documentation

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

Definition at line 27 of file hostname_allocation.h.

References allocate(), init_factory_params(), and read_map_file().

Here is the call graph for this function:

virtual sstmac::sw::hostname_allocation::~hostname_allocation ( )
throw (
)
inlinevirtual

Definition at line 51 of file hostname_allocation.h.

Member Function Documentation

virtual void sstmac::sw::hostname_allocation::allocate ( int  nnode,
const ordered_node_set available,
ordered_node_set allocation 
) const
virtual

Get nodes.

Parameters
nnodenumber of nodes requested
availablethe set of nodes that can be given
allocationreturns the nodes that have been allocated
Returns
Whether the allocation succeeded based on available nodes

Implements sstmac::sw::node_allocator.

Referenced by hostname_allocation().

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

Reimplemented from sstmac::sw::node_allocator.

Referenced by hostname_allocation().

static void sstmac::sw::hostname_allocation::read_map_file ( parallel_runtime rt,
const char *  here,
const std::string &  mapfile,
std::map< std::string, std::vector< int > > &  hostmap 
)
static

This function reads in a map file for mapping host names to network coordinates.

Parameters
herethe function making the call, used for more informative exceptions
mapfilename of the map file
hostmapmap in which host mappings are placed

Referenced by hostname_allocation().

Member Data Documentation

nodemap_t sstmac::sw::hostname_allocation::hostnamemap_
static

Definition at line 55 of file hostname_allocation.h.

std::string sstmac::sw::hostname_allocation::mapfile_
protected

Definition at line 60 of file hostname_allocation.h.

std::map<long, std::string> sstmac::sw::hostname_allocation::nodenum_to_host_map_
static

Definition at line 57 of file hostname_allocation.h.


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