SST/macro
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
sstmac::SimulationQueue Class Reference

#include <driver.h>

Collaboration diagram for sstmac::SimulationQueue:
Collaboration graph

Public Member Functions

 SimulationQueue ()
 
 ~SimulationQueue ()
 
Simulationfork (sprockit::sim_parameters &params, int nresults=0, double *resultPtr=nullptr)
 
bool runJobsOnMaster () const
 
int maxParallelWorkers () const
 
void setNextWorker ()
 
void teardown ()
 
void buildUp ()
 
void init (int argc, char **argv)
 
void finalize ()
 
Simulationfork (sprockit::sim_parameters *params, int nresults=0, double *resultPtr=nullptr)
 
SimulationwaitForForked ()
 
void clear (Simulation *sim)
 
void run (sprockit::sim_parameters *params, sim_stats &stats)
 
SimulationsendScanPoint (int bufferSize, char *bufferPtr, int nresults, double *resultPtr=nullptr)
 
sprockit::sim_parameters * template_params ()
 
void rerun (sprockit::sim_parameters *params, sim_stats &stats)
 
void busyLoopMPI ()
 
void runScanPoint (char *buffer, sim_stats &stats)
 
int workerID () const
 
Simulation ** allocateSims (int max_nthread)
 
char * allocateTmpBuffer (size_t buf_size)
 
double ** allocateResults (int njobs, int nresults)
 
double ** allocateParams (int njobs, int nparams)
 
uq_param_t ** allocateParamStructs (int njobs, int nparams)
 

Static Public Member Functions

static double * allocateResults (int nresults)
 
static void publishResults ()
 
static void delete_statics ()
 

Private Attributes

bool built_up_
 
std::list< Simulation * > pending_
 
parallel_runtimert_
 
sprockit::sim_parameters template_params_
 
opts template_opts_
 
Simulation ** sims_
 
int nsims_
 
char * tmp_buffer_
 
size_t tmp_buf_size_
 
std::pair< int, int > result_buf_size_
 
std::pair< int, int > param_buf_size_
 
std::pair< int, int > struct_buf_size_
 
double ** tmp_results_
 
double ** tmp_params_
 
uq_param_t ** tmp_structs_
 
int nproc_
 
int me_
 
int next_worker_
 
bool first_run_
 

Static Private Attributes

static double * results_
 
static int num_results_
 

Detailed Description

Definition at line 179 of file driver.h.

Constructor & Destructor Documentation

sstmac::SimulationQueue::SimulationQueue ( )
sstmac::SimulationQueue::~SimulationQueue ( )

Member Function Documentation

double** sstmac::SimulationQueue::allocateParams ( int  njobs,
int  nparams 
)
uq_param_t** sstmac::SimulationQueue::allocateParamStructs ( int  njobs,
int  nparams 
)
static double* sstmac::SimulationQueue::allocateResults ( int  nresults)
static
double** sstmac::SimulationQueue::allocateResults ( int  njobs,
int  nresults 
)
Simulation** sstmac::SimulationQueue::allocateSims ( int  max_nthread)
char* sstmac::SimulationQueue::allocateTmpBuffer ( size_t  buf_size)
void sstmac::SimulationQueue::buildUp ( )
inline

Definition at line 211 of file driver.h.

References sstmac::Simulation::allocateResults(), sstmac::Simulation::finalize(), sstmac::init(), sstmac::run(), and sstmac::Simulation::stats().

Here is the call graph for this function:

void sstmac::SimulationQueue::busyLoopMPI ( )
void sstmac::SimulationQueue::clear ( Simulation sim)
static void sstmac::SimulationQueue::delete_statics ( )
static
void sstmac::SimulationQueue::finalize ( )
Simulation* sstmac::SimulationQueue::fork ( sprockit::sim_parameters &  params,
int  nresults = 0,
double *  resultPtr = nullptr 
)
inline

Definition at line 187 of file driver.h.

Simulation* sstmac::SimulationQueue::fork ( sprockit::sim_parameters *  params,
int  nresults = 0,
double *  resultPtr = nullptr 
)
void sstmac::SimulationQueue::init ( int  argc,
char **  argv 
)
int sstmac::SimulationQueue::maxParallelWorkers ( ) const
inline

Definition at line 199 of file driver.h.

static void sstmac::SimulationQueue::publishResults ( )
inlinestatic

Definition at line 237 of file driver.h.

void sstmac::SimulationQueue::rerun ( sprockit::sim_parameters *  params,
sim_stats stats 
)
void sstmac::SimulationQueue::run ( sprockit::sim_parameters *  params,
sim_stats stats 
)
bool sstmac::SimulationQueue::runJobsOnMaster ( ) const
inline

Definition at line 194 of file driver.h.

void sstmac::SimulationQueue::runScanPoint ( char *  buffer,
sim_stats stats 
)
Simulation* sstmac::SimulationQueue::sendScanPoint ( int  bufferSize,
char *  bufferPtr,
int  nresults,
double *  resultPtr = nullptr 
)
void sstmac::SimulationQueue::setNextWorker ( )
inline

Definition at line 205 of file driver.h.

void sstmac::SimulationQueue::teardown ( )
sprockit::sim_parameters* sstmac::SimulationQueue::template_params ( )
inline

Definition at line 246 of file driver.h.

Simulation* sstmac::SimulationQueue::waitForForked ( )
int sstmac::SimulationQueue::workerID ( ) const
inline

Definition at line 257 of file driver.h.

References sstmac::Simulation::allocateResults().

Here is the call graph for this function:

Member Data Documentation

bool sstmac::SimulationQueue::built_up_
private

Definition at line 278 of file driver.h.

bool sstmac::SimulationQueue::first_run_
private

Definition at line 302 of file driver.h.

int sstmac::SimulationQueue::me_
private

Definition at line 300 of file driver.h.

int sstmac::SimulationQueue::next_worker_
private

Definition at line 301 of file driver.h.

int sstmac::SimulationQueue::nproc_
private

Definition at line 299 of file driver.h.

int sstmac::SimulationQueue::nsims_
private

Definition at line 286 of file driver.h.

int sstmac::SimulationQueue::num_results_
staticprivate

Definition at line 284 of file driver.h.

std::pair<int,int> sstmac::SimulationQueue::param_buf_size_
private

Definition at line 291 of file driver.h.

std::list<Simulation*> sstmac::SimulationQueue::pending_
private

Definition at line 279 of file driver.h.

std::pair<int,int> sstmac::SimulationQueue::result_buf_size_
private

Definition at line 290 of file driver.h.

double* sstmac::SimulationQueue::results_
staticprivate

Definition at line 283 of file driver.h.

parallel_runtime* sstmac::SimulationQueue::rt_
private

Definition at line 280 of file driver.h.

Simulation** sstmac::SimulationQueue::sims_
private

Definition at line 285 of file driver.h.

std::pair<int,int> sstmac::SimulationQueue::struct_buf_size_
private

Definition at line 292 of file driver.h.

opts sstmac::SimulationQueue::template_opts_
private

Definition at line 282 of file driver.h.

sprockit::sim_parameters sstmac::SimulationQueue::template_params_
private

Definition at line 281 of file driver.h.

size_t sstmac::SimulationQueue::tmp_buf_size_
private

Definition at line 288 of file driver.h.

char* sstmac::SimulationQueue::tmp_buffer_
private

Definition at line 287 of file driver.h.

double** sstmac::SimulationQueue::tmp_params_
private

Definition at line 295 of file driver.h.

double** sstmac::SimulationQueue::tmp_results_
private

Definition at line 294 of file driver.h.

uq_param_t** sstmac::SimulationQueue::tmp_structs_
private

Definition at line 296 of file driver.h.


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