Derived application interface class which spawns simulation codes using system calls. More...
Public Member Functions | |
SysCallApplicInterface (const ProblemDescDB &problem_db) | |
constructor | |
~SysCallApplicInterface () | |
destructor | |
void | derived_map (const Variables &vars, const ActiveSet &set, Response &response, int fn_eval_id) |
Called by map() and other functions to execute the simulation in synchronous mode. The portion of performing an evaluation that is specific to a derived class. | |
void | derived_map_asynch (const ParamResponsePair &pair) |
Called by map() and other functions to execute the simulation in asynchronous mode. The portion of performing an asynchronous evaluation that is specific to a derived class. | |
void | derived_synch (PRPQueue &prp_queue) |
void | derived_synch_nowait (PRPQueue &prp_queue) |
int | derived_synchronous_local_analysis (const int &analysis_id) |
const std::vector< String > & | analysis_drivers () const |
retrieve the analysis drivers specification for application interfaces | |
const AnalysisCode * | analysis_code () const |
return AnalysisCode::fileNameMap when defined for derived Interface class | |
Private Member Functions | |
void | spawn_application (const bool block_flag) |
Spawn the application by managing the input filter, analysis drivers, and output filter. Called from derived_map() & derived_map_asynch(). | |
void | derived_synch_kernel (PRPQueue &prp_queue) |
Convenience function for common code between derived_synch() & derived_synch_nowait() | |
bool | system_call_file_test (const std::string &root_file) |
detect completion of a function evaluation through existence of the necessary results file(s) | |
Private Attributes | |
SysCallAnalysisCode | sysCallSimulator |
SysCallAnalysisCode provides convenience functions for passing the input filter, the analysis drivers, and the output filter to a CommandShell in various combinations. | |
IntSet | sysCallSet |
set of function evaluation id's for active asynchronous system call evaluations | |
IntShortMap | failCountMap |
map linking function evaluation id's to number of response read failures |
Derived application interface class which spawns simulation codes using system calls.
SysCallApplicInterface uses a SysCallAnalysisCode object for performing simulation invocations.
void derived_synch | ( | PRPQueue & | prp_queue | ) | [inline, virtual] |
Check for completion of active asynch jobs (tracked with sysCallSet). Wait for at least one completion and complete all jobs that have returned. This satisifies a "fairness" principle, in the sense that a completed job will _always_ be processed (whereas accepting only a single completion could always accept the same completion - the case of very inexpensive fn. evals. - and starve some servers).
Reimplemented from ApplicationInterface.
References ApplicationInterface::completionSet, and SysCallApplicInterface::derived_synch_kernel().
void derived_synch_nowait | ( | PRPQueue & | prp_queue | ) | [inline, virtual] |
Check for completion of active asynch jobs (tracked with sysCallSet). Make one pass through sysCallSet & complete all jobs that have returned.
Reimplemented from ApplicationInterface.
References SysCallApplicInterface::derived_synch_kernel().
int derived_synchronous_local_analysis | ( | const int & | analysis_id | ) | [inline, virtual] |
This code provides the derived function used by ApplicationInterface::serve_analyses_synch().
Reimplemented from ApplicationInterface.
References SysCallAnalysisCode::spawn_analysis(), and SysCallApplicInterface::sysCallSimulator.