#include <Executor.hxx>

Public Member Functions | |
| Executor () | |
| virtual | ~Executor () |
| void | RunA (Scheduler *graph, int debug=0, bool fromScratch=true) |
| Execute a graph waiting for completion. More... | |
| void | RunW (Scheduler *graph, int debug=0, bool fromScratch=true) |
| void | RunB (Scheduler *graph, int debug=0, bool fromScratch=true) |
| Execute a graph with breakpoints or step by step. More... | |
| void | runWlm (Scheduler *graph, int debug=0, bool fromScratch=true) |
| void | setKeepGoingProperty (bool newVal) |
| bool | getKeepGoingProperty () const |
| void | setDPLScopeSensitive (bool newVal) |
| bool | getDPLScopeSensitive () const |
| YACS::ExecutionMode | getCurrentExecMode () |
| YACS::ExecutorState | getExecutorState () |
| void | setExecMode (YACS::ExecutionMode mode) |
| Dynamically set the current mode of execution. More... | |
| void | setListOfBreakPoints (std::list< std::string > listOfBreakPoints) |
| define a list of nodes names as breakpoints in the graph More... | |
| std::list< std::string > | getTasksToLoad () |
| Get the list of tasks to load, to define a subset to execute in step by step mode. More... | |
| bool | setStepsToExecute (std::list< std::string > listToExecute) |
| Define a subset of task to execute in step by step mode. More... | |
| bool | resumeCurrentBreakPoint () |
| wake up executor when in pause More... | |
| bool | isNotFinished () |
| void | stopExecution () |
| stops the execution as soon as possible More... | |
| bool | saveState (const std::string &xmlFile) |
| save the current state of execution in an xml file More... | |
| bool | loadState () |
| not yet implemented More... | |
| int | getMaxNbOfThreads () const |
| void | setMaxNbOfThreads (int maxNbThreads) |
| int | getNbOfThreads () |
| int | getNumberOfRunningTasks () |
| number of running tasks More... | |
| void | displayDot (Scheduler *graph) |
| Display the graph state as a dot display, public method. More... | |
| void | setStopOnError (bool dumpRequested=false, std::string xmlFile="") |
| ask to stop execution on the first node found in error More... | |
| void | unsetStopOnError () |
| ask to do not stop execution on nodes found in error More... | |
| void | waitPause () |
| suspend pilot execution until Executor is in pause or waiting tasks completion mode. More... | |
| bool | suspendASAP () |
| void | resume (bool suspended) |
| YACS::BASES::Mutex & | getTheMutexForSchedulerUpdate () |
| void | loadTask (Task *task, const WorkloadManager::RunInfo &runInfo) |
| YACS::Event | runTask (Task *task) |
| void | makeDatastreamConnections (Task *task) |
| void | beginTask (Task *task) |
| void | endTask (Task *task, YACS::Event ev) |
| void | failTask (Task *task, const std::string &message) |
Static Public Attributes | |
| static int | _maxThreads |
| static size_t | _threadStackSize |
Protected Member Functions | |
| bool | checkBreakPoints () |
| Wait reactivation in modes Step By step or with BreakPoints. More... | |
| void | waitResume () |
| in modes Step By step or with BreakPoint, wait until pilot resumes the execution More... | |
| void | loadTask (Task *task, const Executor *execInst) |
| Perform loading of a Task. More... | |
| void | loadParallelTasks (const std::vector< Task * > &tasks, const Executor *execInst) |
| void | launchTasks (const std::vector< Task * > &tasks) |
| Execute a list of tasks possibly connected through datastream links. More... | |
| void | launchTask (Task *task) |
| Execute a Task in a thread. More... | |
| void | wakeUp () |
| must be used protected by _mutexForSchedulerUpdate! More... | |
| void | sleepWhileNoEventsFromAnyRunningTask () |
| wait until a running task ends More... | |
| void | traceExec (Task *task, const std::string &message, const std::string &placement) |
| void | _displayDot (Scheduler *graph) |
| Display the graph state as a dot display. More... | |
| virtual void | sendEvent (const std::string &event) |
| emit notification to all observers registered with the dispatcher More... | |
| void | filterTasksConsideringContainers (std::vector< Task * > &tsks) |
Static Protected Member Functions | |
| static std::string | ComputePlacement (Task *zeTask) |
| static void * | functionForTaskLoad (void *) |
| static void * | functionForTaskExecution (void *) |
| Function to perform execution of a task in a thread. More... | |
Threaded Executor.
Definition at line 62 of file Executor.hxx.
| Executor::Executor | ( | ) |
Definition at line 82 of file Executor.cxx.
References _dumpOnErrorRequested, _errorDetected, _execMode, _executorState, _isOKToEnd, _isRunningunderExternalControl, _maxThreads, _numberOfEndedTasks, _numberOfRunningTasks, _root, _semThreadCnt, _stopOnErrorRequested, _toContinue, YACS::CONTINUE, DEBTRACE, and YACS::NOTYETINITIALIZED.
|
virtual |
Definition at line 99 of file Executor.cxx.
|
protected |
Display the graph state as a dot display.
| graph | : the node to display |
Definition at line 729 of file Executor.cxx.
References isfile().
Referenced by displayDot(), RunA(), RunB(), and runWlm().
| void Executor::beginTask | ( | Task * | task | ) |
Definition at line 1464 of file Executor.cxx.
References _mutexForSchedulerUpdate, _numberOfRunningTasks, and _runningTasks.
Referenced by runWlm().
|
protected |
Wait reactivation in modes Step By step or with BreakPoints.
Check mode of execution (set by main thread):
Definition at line 752 of file Executor.cxx.
References _condForPilot, _execMode, _executorState, _isOKToEnd, _listOfBreakPoints, _listOfTasksToLoad, _mainSched, _mutexForSchedulerUpdate, _tasks, _tasksSave, YACS::CONTINUE, DEBTRACE, getNbOfThreads(), YACS::ENGINE::Scheduler::getTaskName(), YACS::PAUSED, sendEvent(), YACS::STEPBYSTEP, YACS::STOPBEFORENODES, YACS::WAITINGTASKS, and waitResume().
|
staticprotected |
Definition at line 1412 of file Executor.cxx.
References YACS::ENGINE::Task::getContainer(), and YACS::ENGINE::Container::getFullPlacementId().
Referenced by functionForTaskExecution(), launchTask(), launchTasks(), loadTask(), makeDatastreamConnections(), and runTask().
| void Executor::displayDot | ( | Scheduler * | graph | ) |
Display the graph state as a dot display, public method.
Definition at line 718 of file Executor.cxx.
References _displayDot(), and _isRunningunderExternalControl.
Referenced by main().
| void Executor::endTask | ( | Task * | task, |
| YACS::Event | ev | ||
| ) |
Definition at line 1473 of file Executor.cxx.
References _condForPilot, _condForStepByStep, _errorDetected, _execMode, _executorState, _isOKToEnd, _isRunningunderExternalControl, _mainSched, _mutexForSchedulerUpdate, _numberOfRunningTasks, _runningTasks, _stopOnErrorRequested, YACS::ABORT, YACS::ENGINE::Task::aborted(), YACS::CONTINUE, testCppPluginInvokation::ex, YACS::FINISH, YACS::ENGINE::Task::finished(), YACS::ENGINE::Scheduler::notifyFrom(), YACS::PAUSED, sendEvent(), YACS::STEPBYSTEP, YACS::WAITINGTASKS, and wakeUp().
Referenced by failTask(), and YACS::ENGINE::WlmTask::run().
| void Executor::failTask | ( | Task * | task, |
| const std::string & | message | ||
| ) |
Definition at line 1524 of file Executor.cxx.
References YACS::ABORT, endTask(), YACS::ERROR, YACS::ENGINE::Node::setErrorDetails(), and YACS::ENGINE::StateLoader().
Referenced by YACS::ENGINE::WlmTask::run().
|
protected |
This method takes in input a list of tasks and selects from that lists a part of it considering only the containers. If tasks have no container instance subclass of HomogeneousPoolContainer this method will let the tsks untouched.
| [in,out] | tsks | - list of tasks to be |
Definition at line 1352 of file Executor.cxx.
References _maxNbThreads, _runningTasks, YACS::ENGINE::HomogeneousPoolContainer::allocateFor(), DEBTRACE, YACS::ENGINE::HomogeneousPoolContainer::getLocker(), YACS::ENGINE::HomogeneousPoolContainer::getNumberOfFreePlace(), yacsorb.CORBAEngineTest::i, and gui.GraphViewer::m.
|
staticprotected |
Function to perform execution of a task in a thread.
Calls Task::execute
Calls Task::finished when the task is finished
Calls (notify with event YACS::FINISH) Scheduler::notifyFrom when the task is finished
Calls Executor::wakeUp and Executor::notifyEndOfThread
Definition at line 1165 of file Executor.cxx.
References _condForPilot, _condForStepByStep, _errorDetected, _execMode, _executorState, _isOKToEnd, _isRunningunderExternalControl, _mutexForSchedulerUpdate, _numberOfRunningTasks, _runningTasks, _semForMaxThreads, _semThreadCnt, _stopOnErrorRequested, YACS::ABORT, YACS::ENGINE::Task::aborted(), YACS::ENGINE::Node::applyDPLScope(), driver_internal::args, ComputePlacement(), YACS::CONTINUE, DEBTRACE, YACS::ENGINE::Task::disconnectService(), testCppPluginInvokation::ex, threadargs::execInst, YACS::ENGINE::Task::execute(), YACS::FINISH, YACS::ENGINE::Task::finished(), YACS::ENGINE::Task::getContainer(), getDPLScopeSensitive(), YACS::ENGINE::HomogeneousPoolContainer::getLocker(), YACS::ENGINE::Task::getState(), YACS::ENGINE::Node::getStateName(), YACS::ENGINE::Scheduler::notifyFrom(), YACS::PAUSED, YACS::ENGINE::HomogeneousPoolContainer::release(), threadargs::sched, sendEvent(), YACS::STEPBYSTEP, threadargs::task, traceExec(), YACS::WAITINGTASKS, and wakeUp().
Referenced by launchTask().
|
staticprotected |
This thread is NOT supposed to be detached !
Definition at line 1140 of file Executor.cxx.
References driver_internal::args, DEBTRACE, threadargs::execInst, loadTask(), threadargs::sched, and threadargs::task.
Referenced by loadParallelTasks().
| YACS::ExecutionMode Executor::getCurrentExecMode | ( | ) |
Definition at line 373 of file Executor.cxx.
References _execMode, and _isRunningunderExternalControl.
|
inline |
Definition at line 109 of file Executor.hxx.
Referenced by functionForTaskExecution(), and runTask().
| YACS::ExecutorState Executor::getExecutorState | ( | ) |
Definition at line 380 of file Executor.cxx.
References _executorState, and _isRunningunderExternalControl.
Referenced by main().
|
inline |
Definition at line 107 of file Executor.hxx.
Referenced by YACS::ENGINE::ForEachLoopGen::updateStateOnFailedEventFrom().
| int Executor::getMaxNbOfThreads | ( | ) | const |
Definition at line 1111 of file Executor.cxx.
References _maxNbThreads.
| int Executor::getNbOfThreads | ( | ) |
Definition at line 1121 of file Executor.cxx.
References _isRunningunderExternalControl, and _mutexForNbOfConcurrentThreads.
Referenced by checkBreakPoints().
| int Executor::getNumberOfRunningTasks | ( | ) |
number of running tasks
Definition at line 1130 of file Executor.cxx.
References _isRunningunderExternalControl, _mutexForSchedulerUpdate, and _numberOfRunningTasks.
| std::list< std::string > Executor::getTasksToLoad | ( | ) |
Get the list of tasks to load, to define a subset to execute in step by step mode.
If the executor is not in mode YACS::WAITINGTASKS nor YACS::PAUSED, the list is empty. Use Executor::waitPause to wait.
Definition at line 507 of file Executor.cxx.
References _executorState, _isRunningunderExternalControl, _listOfTasksToLoad, _mutexForSchedulerUpdate, DEBTRACE, YACS::FINISHED, YACS::INITIALISED, YACS::NOTYETINITIALIZED, YACS::PAUSED, YACS::RUNNING, YACS::STOPPED, and YACS::WAITINGTASKS.
|
inline |
Definition at line 133 of file Executor.hxx.
Referenced by YACS::ENGINE::ForEachLoopGen::getPassedResults(), and YACS::ENGINE::schemaSaveState().
| bool Executor::isNotFinished | ( | ) |
Definition at line 387 of file Executor.cxx.
References _isRunningunderExternalControl, and _toContinue.
Referenced by main().
|
protected |
Execute a Task in a thread.
| task | : Task to execute |
Calls Scheduler::notifyFrom of main node (_mainSched) to notify start
Calls Executor::functionForTaskExecution in Thread
Definition at line 1022 of file Executor.cxx.
References _mainSched, _maxThreads, _mutexForSchedulerUpdate, _numberOfRunningTasks, _runningTasks, _semForMaxThreads, _semThreadCnt, _threadStackSize, driver_internal::args, YACS::ENGINE::Task::begin(), ComputePlacement(), DEBTRACE, functionForTaskExecution(), YACS::ENGINE::Task::getCoupledTasks(), YACS::ENGINE::Task::getState(), threadargs::task, YACS::TOACTIVATE, and traceExec().
Referenced by launchTasks().
|
protected |
Execute a list of tasks possibly connected through datastream links.
| tasks | : a list of tasks to execute |
Definition at line 921 of file Executor.cxx.
References _mainSched, _mutexForSchedulerUpdate, YACS::ABORT, ComputePlacement(), YACS::ERROR, testCppPluginInvokation::ex, YACS::ENGINE::Node::getStateName(), launchTask(), YACS::ENGINE::Scheduler::notifyFrom(), yacsorb.CORBAEngineTest::state, gui.Appli::t, YACS::TOLOAD, YACS::TORECONNECT, and traceExec().
|
protected |
Definition at line 899 of file Executor.cxx.
References _mainSched, _tasks, _threadStackSize, driver_internal::args, DEBTRACE, and functionForTaskLoad().
Referenced by RunB().
| bool Executor::loadState | ( | ) |
not yet implemented
Definition at line 698 of file Executor.cxx.
References _isRunningunderExternalControl, and DEBTRACE.
Perform loading of a Task.
| task | : Task to load |
Definition at line 853 of file Executor.cxx.
References _mainSched, _mutexForSchedulerUpdate, YACS::ABORT, YACS::ENGINE::Task::aborted(), ComputePlacement(), DEBTRACE, testCppPluginInvokation::ex, YACS::ENGINE::Task::getState(), YACS::ENGINE::Node::getStateName(), YACS::ENGINE::Task::initService(), YACS::ENGINE::Task::load(), YACS::ENGINE::Scheduler::notifyFrom(), YACS::START, YACS::TOLOAD, and traceExec().
| void Executor::loadTask | ( | Task * | task, |
| const WorkloadManager::RunInfo & | runInfo | ||
| ) |
Definition at line 1423 of file Executor.cxx.
References _mainSched, _mutexForSchedulerUpdate, YACS::ABORT, YACS::ENGINE::Task::aborted(), ComputePlacement(), testCppPluginInvokation::ex, YACS::ENGINE::Task::getState(), YACS::ENGINE::Node::getStateName(), YACS::ENGINE::Task::imposeResource(), YACS::ENGINE::Task::initService(), YACS::ENGINE::Task::load(), YACS::ENGINE::Scheduler::notifyFrom(), YACS::START, YACS::TOLOAD, and traceExec().
Referenced by functionForTaskLoad(), YACS::ENGINE::WlmTask::run(), and RunA().
| void Executor::makeDatastreamConnections | ( | Task * | task | ) |
Definition at line 1605 of file Executor.cxx.
References _mainSched, _mutexForSchedulerUpdate, YACS::ABORT, YACS::ENGINE::Task::aborted(), ComputePlacement(), YACS::ENGINE::Task::connected(), YACS::ENGINE::Task::connectService(), YACS::ERROR, testCppPluginInvokation::ex, YACS::ENGINE::Task::getCoupledTasks(), YACS::ENGINE::Task::getState(), YACS::ENGINE::Node::getStateName(), YACS::ENGINE::Scheduler::notifyFrom(), yacsorb.CORBAEngineTest::state, gui.Appli::t, YACS::TOLOAD, YACS::TORECONNECT, and traceExec().
Referenced by YACS::ENGINE::WlmTask::run().
| void Executor::resume | ( | bool | suspended | ) |
This method is expected to be called in association with suspendASAP method. Expected to be called just after suspendASAP with output of resume as input parameter
Definition at line 660 of file Executor.cxx.
References _mutexForSchedulerUpdate.
Referenced by gui.Appli.Browser::run(), gui.Appli.Browser::step(), and gui.Appli.Browser::susp().
| bool Executor::resumeCurrentBreakPoint | ( | ) |
wake up executor when in pause
When Executor is in state paused or waiting for task completion, the thread running loop RunB waits on condition _condForStepByStep. Thread RunB is waken up.
Definition at line 448 of file Executor.cxx.
References _condForStepByStep, _executorState, _isRunningunderExternalControl, _mutexForSchedulerUpdate, DEBTRACE, YACS::FINISHED, YACS::PAUSED, YACS::RUNNING, sendEvent(), YACS::STOPPED, and YACS::WAITINGTASKS.
Referenced by main(), and stopExecution().
| void Executor::RunA | ( | Scheduler * | graph, |
| int | debug = 0, |
||
| bool | fromScratch = true |
||
| ) |
Execute a graph waiting for completion.
| graph | : schema to execute |
| debug | : display the graph with dot if debug == 1 |
| fromScratch | : if true the graph is reinitialized |
Calls Scheduler::getNextTasks and Scheduler::selectRunnableTasks to select tasks to execute
Calls Executor::launchTask to execute a selected Task.
Completion when graph is finished (Scheduler::isFinished)
Definition at line 116 of file Executor.cxx.
References _displayDot(), _execMode, _isWaitingEventsFromRunningTasks, _mainSched, _mutexForSchedulerUpdate, _numberOfEndedTasks, _numberOfRunningTasks, _root, _runningTasks, _toContinue, YACS::CONTINUE, DEBTRACE, YACS::ENGINE::Scheduler::exUpdateState(), YACS::ENGINE::Scheduler::getNextTasks(), yacsorb.CORBAEngineTest::i, YACS::ENGINE::Scheduler::init(), YACS::ENGINE::Scheduler::isFinished(), launchTasks(), loadTask(), YACS::ENGINE::Scheduler::selectRunnableTasks(), and sleepWhileNoEventsFromAnyRunningTask().
| void Executor::RunB | ( | Scheduler * | graph, |
| int | debug = 0, |
||
| bool | fromScratch = true |
||
| ) |
Execute a graph with breakpoints or step by step.
To be launch in a thread (main thread controls the progression).
| graph | : schema to execute |
| debug | : display the graph with dot if debug >0 |
| fromScratch | : if false, state from a previous partial exection is already loaded |
Calls Scheduler::getNextTasks and Scheduler::selectRunnableTasks to select tasks to execute
Calls Executor::checkBreakPoints to verify if a pause is requested
Calls Executor::launchTask to execute a selected Task
Completion when graph is finished (Scheduler::isFinished)
States of execution:
Modes of Execution:
A breakpoint is defined by a node name. The breakpoint is reached when the node becomes ready. Step by Step means execution node by node or group of node by group of nodes. At a given step, the user decides to launch all the ready nodes or only a subset (Caution: some nodes must run in parallel). The next event (end of task) may give a new set of ready nodes, and define a new step.
The graph execution may be controled by a pilot which sends requests. Requests are asynchronous. Requests are taken into account only on certain states, otherwise return the status IgnoredRequest.
If the pilot wants to wait the state YACS::PAUSED or YACS::WAITINGTASKS, synchronisation is obtained with:
TO BE VALIDATED:
Definition at line 235 of file Executor.cxx.
References _condForPilot, _displayDot(), _dumpErrorFile, _dumpOnErrorRequested, _errorDetected, _executorState, _isOKToEnd, _isWaitingEventsFromRunningTasks, _mainSched, _mutexForSchedulerUpdate, _mutexForTrace, _numberOfEndedTasks, _numberOfRunningTasks, _root, _runningTasks, _start, _tasks, _toContinue, _trace, checkBreakPoints(), DEBTRACE, testCppPluginInvokation::ex, YACS::ENGINE::Scheduler::exUpdateState(), filterTasksConsideringContainers(), YACS::FINISHED, YACS::ENGINE::Scheduler::getName(), YACS::ENGINE::Scheduler::getNextTasks(), YACS::ENGINE::Scheduler::init(), YACS::INITIALISED, YACS::ENGINE::Scheduler::isFinished(), launchTasks(), loadParallelTasks(), YACS::NOTYETINITIALIZED, YACS::RUNNING, saveState(), YACS::ENGINE::Scheduler::selectRunnableTasks(), sendEvent(), sleepWhileNoEventsFromAnyRunningTask(), and YACS::STOPPED.
Referenced by executorFunc(), and RunW().
| YACS::Event Executor::runTask | ( | Task * | task | ) |
Definition at line 1535 of file Executor.cxx.
References _mainSched, _mutexForSchedulerUpdate, YACS::ABORT, YACS::ENGINE::Node::applyDPLScope(), YACS::ENGINE::Task::begin(), ComputePlacement(), DEBTRACE, YACS::ENGINE::Task::disconnectService(), testCppPluginInvokation::ex, YACS::ENGINE::Task::execute(), YACS::FINISH, YACS::ENGINE::Task::getContainer(), getDPLScopeSensitive(), YACS::ENGINE::HomogeneousPoolContainer::getLocker(), YACS::ENGINE::Task::getState(), YACS::ENGINE::Node::getStateName(), YACS::ENGINE::HomogeneousPoolContainer::release(), and traceExec().
Referenced by YACS::ENGINE::WlmTask::run().
| void Executor::RunW | ( | Scheduler * | graph, |
| int | debug = 0, |
||
| bool | fromScratch = true |
||
| ) |
Definition at line 1833 of file Executor.cxx.
References YACS::ENGINE::Scheduler::getProperty(), RunB(), and runWlm().
Referenced by driverTest(), and main().
| void Executor::runWlm | ( | Scheduler * | graph, |
| int | debug = 0, |
||
| bool | fromScratch = true |
||
| ) |
Definition at line 1688 of file Executor.cxx.
References _condForPilot, _displayDot(), _dumpErrorFile, _dumpOnErrorRequested, _errorDetected, _executorState, _isOKToEnd, _isWaitingEventsFromRunningTasks, _mainSched, _mutexForSchedulerUpdate, _mutexForTrace, _numberOfEndedTasks, _numberOfRunningTasks, _root, _runningTasks, _start, _tasks, _toContinue, _trace, beginTask(), checkBreakPoints(), DEBTRACE, testCppPluginInvokation::ex, YACS::ENGINE::Scheduler::exUpdateState(), filterTasksConsideringContainers(), YACS::FINISHED, YACS::ENGINE::Scheduler::getName(), YACS::ENGINE::Scheduler::getNextTasks(), YACS::ENGINE::Scheduler::init(), YACS::INITIALISED, YACS::ENGINE::Scheduler::isFinished(), YACS::ENGINE::WlmTask::loadResources(), YACS::NOTYETINITIALIZED, YACS::RUNNING, saveState(), YACS::ENGINE::Scheduler::selectRunnableTasks(), sendEvent(), sleepWhileNoEventsFromAnyRunningTask(), YACS::STOPPED, and gui.Appli::t.
Referenced by RunW().
| bool Executor::saveState | ( | const std::string & | xmlFile | ) |
save the current state of execution in an xml file
Definition at line 678 of file Executor.cxx.
References _mutexForSchedulerUpdate, _root, YACS::ENGINE::ComposedNode::accept(), YACS::ENGINE::VisitorSaveState::closeFileDump(), DEBTRACE, testCppPluginInvokation::ex, and YACS::ENGINE::VisitorSaveState::openFileDump().
|
protectedvirtual |
emit notification to all observers registered with the dispatcher
The dispatcher is unique and can be obtained by getDispatcher()
Definition at line 1324 of file Executor.cxx.
References _root, YACS::ENGINE::Dispatcher::dispatch(), YACS::ENGINE::Dispatcher::getDispatcher(), and YASSERT.
Referenced by checkBreakPoints(), endTask(), functionForTaskExecution(), resumeCurrentBreakPoint(), RunB(), and runWlm().
|
inline |
Definition at line 108 of file Executor.hxx.
| void Executor::setExecMode | ( | YACS::ExecutionMode | mode | ) |
Dynamically set the current mode of execution.
The mode can be Continue, step by step, or stop before execution of a node defined in a list of breakpoints.
Definition at line 430 of file Executor.cxx.
References _execMode, _isRunningunderExternalControl, _mutexForSchedulerUpdate, and DEBTRACE.
Referenced by main(), and stopExecution().
|
inline |
Definition at line 106 of file Executor.hxx.
| void Executor::setListOfBreakPoints | ( | std::list< std::string > | listOfBreakPoints | ) |
define a list of nodes names as breakpoints in the graph
Definition at line 491 of file Executor.cxx.
References _isRunningunderExternalControl, _listOfBreakPoints, _mutexForSchedulerUpdate, and DEBTRACE.
| void Executor::setMaxNbOfThreads | ( | int | maxNbThreads | ) |
Definition at line 1116 of file Executor.cxx.
References _maxNbThreads.
| bool Executor::setStepsToExecute | ( | std::list< std::string > | listToExecute | ) |
Define a subset of task to execute in step by step mode.
Behaviour is unpredictable if the list is not a subset of the list given by Executor::getTasksToLoad in the current step. If some nodes must run in parallel, they must stay together in the list.
Definition at line 545 of file Executor.cxx.
References _executorState, _isRunningunderExternalControl, _mainSched, _mutexForSchedulerUpdate, _tasks, _tasksSave, DEBTRACE, YACS::FINISHED, YACS::ENGINE::Scheduler::getTaskName(), YACS::INITIALISED, YACS::NOTYETINITIALIZED, YACS::PAUSED, YACS::RUNNING, YACS::STOPPED, and YACS::WAITINGTASKS.
| void Executor::setStopOnError | ( | bool | dumpRequested = false, |
| std::string | xmlFile = "" |
||
| ) |
ask to stop execution on the first node found in error
| dumpRequested | produce a state dump when an error is found |
| xmlFile | name of file used for state dump |
Definition at line 399 of file Executor.cxx.
References _dumpErrorFile, _dumpOnErrorRequested, _mutexForSchedulerUpdate, _stopOnErrorRequested, and DEBTRACE.
Referenced by main().
|
protected |
wait until a running task ends
Definition at line 1082 of file Executor.cxx.
References _condForNewTasksToPerform, _isWaitingEventsFromRunningTasks, _mutexForSchedulerUpdate, _numberOfEndedTasks, _numberOfRunningTasks, and DEBTRACE.
| void Executor::stopExecution | ( | ) |
stops the execution as soon as possible
Definition at line 668 of file Executor.cxx.
References _isOKToEnd, resumeCurrentBreakPoint(), setExecMode(), and YACS::STEPBYSTEP.
| bool Executor::suspendASAP | ( | ) |
This method can be called at any time simultaneously during a RunB call. This method will wait until the executor is locked in a consistent state of a running graph.
This method is expected to be called in association with resume method. The returned parameter is expected to be transfered to resume method.
Definition at line 643 of file Executor.cxx.
References _executorState, _mutexForSchedulerUpdate, _toContinue, and YACS::FINISHED.
|
protected |
Definition at line 1301 of file Executor.cxx.
References _mainSched, _mutexForTrace, _start, _trace, YACS::ENGINE::Task::getContainer(), YACS::ENGINE::Container::getName(), YACS::ENGINE::Scheduler::getTaskName(), and threadargs::task.
Referenced by functionForTaskExecution(), launchTask(), launchTasks(), loadTask(), makeDatastreamConnections(), and runTask().
| void Executor::unsetStopOnError | ( | ) |
ask to do not stop execution on nodes found in error
Definition at line 416 of file Executor.cxx.
References _mutexForSchedulerUpdate, and _stopOnErrorRequested.
| void Executor::waitPause | ( | ) |
suspend pilot execution until Executor is in pause or waiting tasks completion mode.
Do nothing if execution is finished or in pause. Wait first step if Executor is running or in initialization.
Definition at line 608 of file Executor.cxx.
References _condForPilot, _executorState, _isRunningunderExternalControl, _mutexForSchedulerUpdate, DEBTRACE, YACS::FINISHED, YACS::INITIALISED, YACS::NOTYETINITIALIZED, YACS::PAUSED, YACS::RUNNING, YACS::STOPPED, and YACS::WAITINGTASKS.
|
protected |
in modes Step By step or with BreakPoint, wait until pilot resumes the execution
With the condition Mutex, the mutex is released atomically during the wait. Pilot calls Executor::resumeCurrentBreakPoint to resume execution. Must be called while mutex is locked.
Definition at line 840 of file Executor.cxx.
References _condForStepByStep, _mutexForSchedulerUpdate, and DEBTRACE.
Referenced by checkBreakPoints().
|
protected |
must be used protected by _mutexForSchedulerUpdate!
Definition at line 1099 of file Executor.cxx.
References _condForNewTasksToPerform, _isWaitingEventsFromRunningTasks, _numberOfEndedTasks, and DEBTRACE.
Referenced by endTask(), and functionForTaskExecution().
|
protected |
Definition at line 69 of file Executor.hxx.
Referenced by sleepWhileNoEventsFromAnyRunningTask(), and wakeUp().
|
protected |
Definition at line 72 of file Executor.hxx.
Referenced by checkBreakPoints(), endTask(), functionForTaskExecution(), RunB(), runWlm(), and waitPause().
|
protected |
Definition at line 71 of file Executor.hxx.
Referenced by endTask(), functionForTaskExecution(), resumeCurrentBreakPoint(), and waitResume().
|
protected |
specifies if scope DynParaLoop is active or not. False by default.
Definition at line 97 of file Executor.hxx.
|
protected |
Definition at line 94 of file Executor.hxx.
Referenced by RunB(), runWlm(), and setStopOnError().
|
protected |
Definition at line 79 of file Executor.hxx.
Referenced by Executor(), RunB(), runWlm(), and setStopOnError().
|
protected |
Definition at line 80 of file Executor.hxx.
Referenced by endTask(), Executor(), functionForTaskExecution(), RunB(), and runWlm().
|
protected |
Definition at line 88 of file Executor.hxx.
Referenced by checkBreakPoints(), endTask(), Executor(), functionForTaskExecution(), getCurrentExecMode(), RunA(), and setExecMode().
|
protected |
Definition at line 87 of file Executor.hxx.
Referenced by checkBreakPoints(), endTask(), Executor(), functionForTaskExecution(), getExecutorState(), getTasksToLoad(), resumeCurrentBreakPoint(), RunB(), runWlm(), setStepsToExecute(), suspendASAP(), and waitPause().
|
protected |
Definition at line 77 of file Executor.hxx.
Referenced by checkBreakPoints(), endTask(), Executor(), functionForTaskExecution(), RunB(), runWlm(), and stopExecution().
|
protected |
Definition at line 81 of file Executor.hxx.
Referenced by displayDot(), endTask(), Executor(), functionForTaskExecution(), getCurrentExecMode(), getExecutorState(), getNbOfThreads(), getNumberOfRunningTasks(), getTasksToLoad(), isNotFinished(), loadState(), resumeCurrentBreakPoint(), setExecMode(), setListOfBreakPoints(), setStepsToExecute(), and waitPause().
|
protected |
Definition at line 82 of file Executor.hxx.
Referenced by RunA(), RunB(), runWlm(), sleepWhileNoEventsFromAnyRunningTask(), and wakeUp().
|
protected |
Definition at line 95 of file Executor.hxx.
|
protected |
Definition at line 89 of file Executor.hxx.
Referenced by checkBreakPoints(), and setListOfBreakPoints().
|
protected |
Definition at line 90 of file Executor.hxx.
Referenced by checkBreakPoints(), and getTasksToLoad().
|
protected |
Definition at line 65 of file Executor.hxx.
Referenced by checkBreakPoints(), endTask(), launchTask(), launchTasks(), loadParallelTasks(), loadTask(), makeDatastreamConnections(), RunA(), RunB(), runTask(), runWlm(), setStepsToExecute(), and traceExec().
|
protected |
Definition at line 75 of file Executor.hxx.
Referenced by filterTasksConsideringContainers(), getMaxNbOfThreads(), and setMaxNbOfThreads().
|
static |
Definition at line 131 of file Executor.hxx.
Referenced by Executor(), launchTask(), and YACS::ENGINE::Runtime::Runtime().
|
protected |
Definition at line 68 of file Executor.hxx.
Referenced by getNbOfThreads().
|
protected |
Definition at line 73 of file Executor.hxx.
Referenced by beginTask(), checkBreakPoints(), endTask(), functionForTaskExecution(), getNumberOfRunningTasks(), getTasksToLoad(), launchTask(), launchTasks(), loadTask(), makeDatastreamConnections(), resume(), resumeCurrentBreakPoint(), RunA(), RunB(), runTask(), runWlm(), saveState(), setExecMode(), setListOfBreakPoints(), setStepsToExecute(), setStopOnError(), sleepWhileNoEventsFromAnyRunningTask(), suspendASAP(), unsetStopOnError(), waitPause(), and waitResume().
|
protected |
Definition at line 74 of file Executor.hxx.
Referenced by RunB(), runWlm(), and traceExec().
|
protected |
Definition at line 67 of file Executor.hxx.
|
protected |
Definition at line 85 of file Executor.hxx.
Referenced by Executor(), RunA(), RunB(), runWlm(), sleepWhileNoEventsFromAnyRunningTask(), and wakeUp().
|
protected |
Definition at line 83 of file Executor.hxx.
Referenced by beginTask(), endTask(), Executor(), functionForTaskExecution(), getNumberOfRunningTasks(), launchTask(), RunA(), RunB(), runWlm(), and sleepWhileNoEventsFromAnyRunningTask().
|
protected |
Definition at line 66 of file Executor.hxx.
Referenced by Executor(), RunA(), RunB(), runWlm(), saveState(), and sendEvent().
|
protected |
Definition at line 84 of file Executor.hxx.
Referenced by beginTask(), endTask(), filterTasksConsideringContainers(), functionForTaskExecution(), launchTask(), RunA(), RunB(), and runWlm().
|
protected |
Definition at line 70 of file Executor.hxx.
Referenced by functionForTaskExecution(), and launchTask().
|
protected |
Definition at line 86 of file Executor.hxx.
Referenced by Executor(), functionForTaskExecution(), and launchTask().
|
protected |
Definition at line 98 of file Executor.hxx.
Referenced by RunB(), runWlm(), and traceExec().
|
protected |
Definition at line 78 of file Executor.hxx.
Referenced by endTask(), Executor(), functionForTaskExecution(), setStopOnError(), and unsetStopOnError().
|
protected |
Definition at line 91 of file Executor.hxx.
Referenced by checkBreakPoints(), loadParallelTasks(), RunB(), runWlm(), and setStepsToExecute().
|
protected |
Definition at line 92 of file Executor.hxx.
Referenced by checkBreakPoints(), and setStepsToExecute().
|
static |
Definition at line 132 of file Executor.hxx.
Referenced by launchTask(), loadParallelTasks(), and YACS::ENGINE::Runtime::Runtime().
|
protected |
Definition at line 76 of file Executor.hxx.
Referenced by Executor(), isNotFinished(), RunA(), RunB(), runWlm(), and suspendASAP().
|
protected |
Definition at line 93 of file Executor.hxx.
Referenced by RunB(), runWlm(), and traceExec().