Inheritance diagram for ForkAnalysisCode:

Public Member Functions | |
| ForkAnalysisCode (const ProblemDescDB &problem_db) | |
| constructor | |
| ~ForkAnalysisCode () | |
| destructor | |
| pid_t | fork_program (const bool block_flag) |
| for completion using waitpid() if block_flag is true | |
| void | check_status (const int status) |
| error code was returned | |
| void | ifilter_argument_list () |
| set argList for execution of the input filter | |
| void | ofilter_argument_list () |
| set argList for execution of the output filter | |
| void | driver_argument_list (const int analysis_id) |
| set argList for execution of the specified analysis driver | |
Private Attributes | |
| StringArray | argList |
| These are converted to an array of const char*'s in fork_program(). | |
ForkAnalysisCode creates a copy of the parent DAKOTA process using fork()/vfork() and then replaces the copy with a simulation process using execvp(). The parent process can then use waitpid() to wait on completion of the simulation process.
| void check_status | ( | const int | status | ) |
error code was returned
Check to see if the process terminated abnormally (WIFEXITED(status)==0) or if either execvp or the application returned a status code of -1 (WIFEXITED(status)!=0 && (signed char)WEXITSTATUS(status)==-1). If one of these conditions is detected, output a failure message and abort. Note: the application code should not return a status code of -1 unless an immediate abort of dakota is wanted. If for instance, failure capturing is to be used, the application code should write the word "FAIL" to the appropriate results file and return a status code of 0 through exit().
1.5.1