$extrastylesheet
Dakota  Version 6.2
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
SysCallApplicInterface Class Reference

Derived application interface class which spawns simulation codes using system calls. More...

Inheritance diagram for SysCallApplicInterface:
ProcessApplicInterface ApplicationInterface Interface GridApplicInterface

List of all members.

Public Member Functions

 SysCallApplicInterface (const ProblemDescDB &problem_db)
 constructor
 ~SysCallApplicInterface ()
 destructor

Protected Member Functions

void wait_local_evaluations (PRPQueue &prp_queue)
void test_local_evaluations (PRPQueue &prp_queue)
int synchronous_local_analysis (int analysis_id)
void init_communicators_checks (int max_eval_concurrency)
void set_communicators_checks (int max_eval_concurrency)
void map_bookkeeping (pid_t pid, int fn_eval_id)
 bookkeeping of process and evaluation ids for asynchronous maps
pid_t create_evaluation_process (bool block_flag)
 Spawn the evaluation by managing the input filter, analysis drivers, and output filter. Called from derived_map() & derived_map_asynch().

Private Member Functions

bool system_call_file_test (const bfs::path &root_file)
 detect completion of a function evaluation through existence of the necessary results file(s)
void spawn_evaluation_to_shell (bool block_flag)
 spawn a complete function evaluation
void spawn_input_filter_to_shell (bool block_flag)
 spawn the input filter portion of a function evaluation
void spawn_analysis_to_shell (int analysis_id, bool block_flag)
 spawn a single analysis as part of a function evaluation
void spawn_output_filter_to_shell (bool block_flag)
 spawn the output filter portion of a function evaluation

Private Attributes

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

Detailed Description

Derived application interface class which spawns simulation codes using system calls.

system() is part of the C API and can be used on both Windows and Unix systems.


Member Function Documentation

void wait_local_evaluations ( PRPQueue &  prp_queue) [inline, protected, 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.

Reimplemented in GridApplicInterface.

References ApplicationInterface::completionSet, and SysCallApplicInterface::test_local_evaluations().

void test_local_evaluations ( PRPQueue &  prp_queue) [protected, virtual]
int synchronous_local_analysis ( int  analysis_id) [inline, protected, virtual]

This code provides the derived function used by ApplicationInterface::serve_analyses_synch().

Reimplemented from ApplicationInterface.

Reimplemented in GridApplicInterface.

References SysCallApplicInterface::spawn_analysis_to_shell().

void init_communicators_checks ( int  max_eval_concurrency) [inline, protected, virtual]

No derived interface plug-ins, so perform construct-time checks. However, process init issues as warnings since some contexts (e.g., HierarchSurrModel) initialize more configurations than will be used.

Reimplemented from ApplicationInterface.

References ApplicationInterface::check_multiprocessor_analysis().

void set_communicators_checks ( int  max_eval_concurrency) [inline, protected, virtual]

Process run-time issues as hard errors.

Reimplemented from ApplicationInterface.

References Dakota::abort_handler(), and ApplicationInterface::check_multiprocessor_analysis().

void spawn_evaluation_to_shell ( bool  block_flag) [private]
void spawn_input_filter_to_shell ( bool  block_flag) [private]

spawn the input filter portion of a function evaluation

Put the input filter to the shell. This function is used when multiple analysis drivers are spread between processors. No need to check for a Null input filter, as this is checked externally. Use of nonblocking shells is supported in this fn, although its use is currently prevented externally.

References CommandShell::asynch_flag(), ProcessApplicInterface::commandLineArgs, Dakota::flush(), ProcessApplicInterface::iFilterName, ProcessApplicInterface::paramsFileName, ProcessApplicInterface::prepare_process_environment(), ProcessApplicInterface::reset_process_environment(), ProcessApplicInterface::resultsFileName, CommandShell::suppress_output_flag(), and ApplicationInterface::suppressOutput.

Referenced by SysCallApplicInterface::create_evaluation_process().

void spawn_analysis_to_shell ( int  analysis_id,
bool  block_flag 
) [private]
void spawn_output_filter_to_shell ( bool  block_flag) [private]

spawn the output filter portion of a function evaluation

Put the output filter to the shell. This function is used when multiple analysis drivers are spread between processors. No need to check for a Null output filter, as this is checked externally. Use of nonblocking shells is supported in this fn, although its use is currently prevented externally.

References CommandShell::asynch_flag(), ProcessApplicInterface::commandLineArgs, Dakota::flush(), ProcessApplicInterface::oFilterName, ProcessApplicInterface::paramsFileName, ProcessApplicInterface::prepare_process_environment(), ProcessApplicInterface::reset_process_environment(), ProcessApplicInterface::resultsFileName, CommandShell::suppress_output_flag(), and ApplicationInterface::suppressOutput.

Referenced by SysCallApplicInterface::create_evaluation_process().


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