1 #ifndef sstmac_main_DRIVER_H 2 #define sstmac_main_DRIVER_H 12 #ifdef SSTMAC_MPI_DRIVER 155 #if SSTMAC_MPI_DRIVER 159 return mpi_requests_;
163 recvResultsRequest() {
164 return &mpi_requests_[2];
169 return &mpi_requests_[1];
173 MPI_Request mpi_requests_[3];
187 fork(sprockit::sim_parameters& params,
189 double* resultPtr =
nullptr){
190 return fork(¶ms, nresults, resultPtr);
200 if (runJobsOnMaster())
return nproc_;
201 else return nproc_ - 1;
206 next_worker_ = (next_worker_ + 1) % nproc_;
215 void init(
int argc,
char** argv);
220 fork(sprockit::sim_parameters* params,
222 double* resultPtr =
nullptr);
243 sendScanPoint(
int bufferSize,
char* bufferPtr,
int nresults,
double* resultPtr =
nullptr);
245 sprockit::sim_parameters*
247 return &template_params_;
251 rerun(sprockit::sim_parameters* params,
sim_stats& stats);
255 void runScanPoint(
char* buffer,
sim_stats& stats);
262 allocateSims(
int max_nthread);
265 allocateTmpBuffer(
size_t buf_size);
271 allocateParams(
int njobs,
int nparams);
274 allocateParamStructs(
int njobs,
int nparams);
sprockit::sim_parameters * template_params()
sprockit::sim_parameters params_
double simulatedTime() const
std::pair< int, int > struct_buf_size_
std::pair< int, int > param_buf_size_
uq_param_t ** tmp_structs_
void setResults(double *results, int numResults)
std::list< Simulation * > pending_
bool runJobsOnMaster() const
Simulation * fork(sprockit::sim_parameters ¶ms, int nresults=0, double *resultPtr=nullptr)
parallel_runtime * init()
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
static void publishResults()
int maxParallelWorkers() const
friend class SimulationQueue
std::pair< int, int > result_buf_size_
void allocateResults(int nresults)
void setStats(const sim_stats &stats)
void run(opts &oo, sstmac::parallel_runtime *rt, sprockit::sim_parameters *params, sim_stats &stats)
sprockit::sim_parameters template_params_
void setParameters(sprockit::sim_parameters *params)
void setComplete(bool flag)