SST/macro
Classes | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
sstmac::parallel_runtime Class Referenceabstract

#include <parallel_runtime.h>

Inheritance diagram for sstmac::parallel_runtime:
Inheritance graph
Collaboration diagram for sstmac::parallel_runtime:
Collaboration graph

Classes

struct  incoming_msg
 

Public Member Functions

virtual ~parallel_runtime ()
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 
virtual void finalize_init ()
 
virtual int64_t allreduce_min (int64_t mintime)=0
 
virtual int64_t allreduce_max (int64_t maxtime)=0
 
virtual void global_sum (long *data, int nelems, int root)=0
 
virtual void global_sum (long long *data, int nelems, int root)=0
 
virtual void global_max (int *data, int nelems, int root)=0
 
virtual void global_max (long *data, int nelems, int root)=0
 
virtual void send (int dst, void *buffer, int buffer_size)=0
 
virtual void gather (void *send_buffer, int num_bytes, void *recv_buffer, int root)=0
 
virtual void allgather (void *send_buffer, int num_bytes, void *recv_buffer)=0
 
virtual void recv (int src, void *buffer, int buffer_size)=0
 
int global_max (int my_elem)
 
long global_max (long my_elem)
 
virtual void bcast (void *buffer, int bytes, int root)=0
 
void bcast_string (std::string &str, int root)
 
std::istream * bcast_file_stream (const std::string &fname)
 
virtual void finalize ()=0
 
virtual void init_runtime_params (sprockit::sim_parameters *params)
 
virtual void init_partition_params (sprockit::sim_parameters *params)
 
virtual void send_recv_messages (std::vector< void * > &incoming)
 
virtual void send_event (int thread_id, timestamp t, topology_id tid, event_loc_id src, uint32_t seqnum, event *ev)
 
int me () const
 
int nproc () const
 
int nthread () const
 
int ser_buf_size () const
 
partitiontopology_partition () const
 
virtual void wait_merge_array (int tag)=0
 
virtual void declare_merge_array (void *buffer, int size, int tag)=0
 
virtual bool release_merge_array (int tag)=0
 
void free_recv_buffers (const std::vector< void * > &buffers)
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 
- Public Member Functions inherited from sstmac::lockable
void lock ()
 
void unlock ()
 

Static Public Attributes

static const int global_root
 

Protected Types

typedef std::pair< int, void * > send_buf_t
 

Protected Member Functions

 parallel_runtime ()
 
virtual void do_send_message (int lp, void *buffer, int size)=0
 
virtual void do_send_recv_messages (std::vector< void * > &buffers)=0
 

Protected Attributes

int nproc_
 
int nthread_
 
int me_
 
std::vector< message_buffer_cachesend_buffer_pools_
 
message_buffer_cache recv_buffer_pool_
 
std::vector< std::vector< void * > > send_buffers_
 
int buf_size_
 
partitionpart_
 

Detailed Description

Definition at line 20 of file parallel_runtime.h.

Member Typedef Documentation

typedef std::pair<int, void*> sstmac::parallel_runtime::send_buf_t
protected

Definition at line 172 of file parallel_runtime.h.

Constructor & Destructor Documentation

virtual sstmac::parallel_runtime::~parallel_runtime ( )
virtual
sstmac::parallel_runtime::parallel_runtime ( )
protected

Referenced by ser_buf_size().

Member Function Documentation

virtual void sstmac::parallel_runtime::allgather ( void *  send_buffer,
int  num_bytes,
void *  recv_buffer 
)
pure virtual
virtual int64_t sstmac::parallel_runtime::allreduce_max ( int64_t  maxtime)
pure virtual
virtual int64_t sstmac::parallel_runtime::allreduce_min ( int64_t  mintime)
pure virtual
virtual void sstmac::parallel_runtime::bcast ( void *  buffer,
int  bytes,
int  root 
)
pure virtual
std::istream* sstmac::parallel_runtime::bcast_file_stream ( const std::string &  fname)

Referenced by global_max().

void sstmac::parallel_runtime::bcast_string ( std::string &  str,
int  root 
)

Referenced by global_max().

virtual void sstmac::parallel_runtime::declare_merge_array ( void *  buffer,
int  size,
int  tag 
)
pure virtual
virtual void sstmac::parallel_runtime::do_send_message ( int  lp,
void *  buffer,
int  size 
)
protectedpure virtual
virtual void sstmac::parallel_runtime::do_send_recv_messages ( std::vector< void * > &  buffers)
protectedpure virtual
virtual void sstmac::parallel_runtime::finalize ( )
pure virtual
virtual void sstmac::parallel_runtime::finalize_init ( )
virtual

Reimplemented from sprockit::factory_type.

Reimplemented in sstmac::mpi::mpi_runtime.

void sstmac::parallel_runtime::free_recv_buffers ( const std::vector< void * > &  buffers)

Referenced by ser_buf_size().

virtual void sstmac::parallel_runtime::gather ( void *  send_buffer,
int  num_bytes,
void *  recv_buffer,
int  root 
)
pure virtual
virtual void sstmac::parallel_runtime::global_max ( int *  data,
int  nelems,
int  root 
)
pure virtual
virtual void sstmac::parallel_runtime::global_max ( long *  data,
int  nelems,
int  root 
)
pure virtual
int sstmac::parallel_runtime::global_max ( int  my_elem)
inline

Definition at line 71 of file parallel_runtime.h.

References global_max().

Here is the call graph for this function:

long sstmac::parallel_runtime::global_max ( long  my_elem)
inline
virtual void sstmac::parallel_runtime::global_sum ( long *  data,
int  nelems,
int  root 
)
pure virtual
virtual void sstmac::parallel_runtime::global_sum ( long long *  data,
int  nelems,
int  root 
)
pure virtual
virtual void sstmac::parallel_runtime::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Reimplemented in sstmac::mpi::mpi_runtime.

virtual void sstmac::parallel_runtime::init_partition_params ( sprockit::sim_parameters *  params)
virtual

Referenced by global_max().

virtual void sstmac::parallel_runtime::init_runtime_params ( sprockit::sim_parameters *  params)
virtual

Reimplemented in sstmac::mpi::mpi_runtime.

Referenced by global_max().

int sstmac::parallel_runtime::me ( ) const
inline

Definition at line 123 of file parallel_runtime.h.

References me_.

int sstmac::parallel_runtime::nproc ( ) const
inline

Definition at line 128 of file parallel_runtime.h.

References nproc_.

int sstmac::parallel_runtime::nthread ( ) const
inline

Definition at line 133 of file parallel_runtime.h.

References nthread_.

virtual void sstmac::parallel_runtime::recv ( int  src,
void *  buffer,
int  buffer_size 
)
pure virtual
virtual bool sstmac::parallel_runtime::release_merge_array ( int  tag)
pure virtual
virtual void sstmac::parallel_runtime::send ( int  dst,
void *  buffer,
int  buffer_size 
)
pure virtual
virtual void sstmac::parallel_runtime::send_event ( int  thread_id,
timestamp  t,
topology_id  tid,
event_loc_id  src,
uint32_t  seqnum,
event ev 
)
virtual
Parameters
Thetopology id to send a remote message to
bufferThe buffer containing a serialized message
sizeThe size of the buffer being sent

Referenced by global_max().

virtual void sstmac::parallel_runtime::send_recv_messages ( std::vector< void * > &  incoming)
virtual
Parameters
poolA buffer cache corresponding to a pool of free buffers
incomingA buffer cache holding buffers that correspond to incoming messages

Referenced by global_max().

int sstmac::parallel_runtime::ser_buf_size ( ) const
inline
partition* sstmac::parallel_runtime::topology_partition ( ) const

Referenced by ser_buf_size().

virtual void sstmac::parallel_runtime::wait_merge_array ( int  tag)
pure virtual

Member Data Documentation

int sstmac::parallel_runtime::buf_size_
protected

Definition at line 174 of file parallel_runtime.h.

Referenced by ser_buf_size().

const int sstmac::parallel_runtime::global_root
static

Definition at line 32 of file parallel_runtime.h.

int sstmac::parallel_runtime::me_
protected

Definition at line 169 of file parallel_runtime.h.

Referenced by me().

int sstmac::parallel_runtime::nproc_
protected

Definition at line 167 of file parallel_runtime.h.

Referenced by nproc().

int sstmac::parallel_runtime::nthread_
protected

Definition at line 168 of file parallel_runtime.h.

Referenced by nthread().

partition* sstmac::parallel_runtime::part_
protected

Definition at line 175 of file parallel_runtime.h.

message_buffer_cache sstmac::parallel_runtime::recv_buffer_pool_
protected

Definition at line 171 of file parallel_runtime.h.

std::vector<message_buffer_cache> sstmac::parallel_runtime::send_buffer_pools_
protected

Definition at line 170 of file parallel_runtime.h.

std::vector<std::vector<void*> > sstmac::parallel_runtime::send_buffers_
protected

Definition at line 173 of file parallel_runtime.h.


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