20 #ifndef __EXECUTOR_HXX__
21 #define __EXECUTOR_HXX__
32 #pragma comment(lib,"winmm.lib")
75 std::uint32_t _maxNbThreads = 10000;
98 std::chrono::steady_clock::time_point
_start;
102 void RunA(
Scheduler *graph,
int debug=0,
bool fromScratch=
true);
103 void RunW(
Scheduler *graph,
int debug=0,
bool fromScratch=
true);
104 void RunB(
Scheduler *graph,
int debug=0,
bool fromScratch=
true);
105 void runWlm(
Scheduler *graph,
int debug=0,
bool fromScratch=
true);
113 void setListOfBreakPoints(std::list<std::string> listOfBreakPoints);
114 std::list<std::string> getTasksToLoad();
115 bool setStepsToExecute(std::list<std::string> listToExecute);
116 bool resumeCurrentBreakPoint();
117 bool isNotFinished();
118 void stopExecution();
119 bool saveState(
const std::string& xmlFile);
121 int getMaxNbOfThreads()
const;
122 void setMaxNbOfThreads(
int maxNbThreads);
123 int getNbOfThreads();
124 int getNumberOfRunningTasks();
126 void setStopOnError(
bool dumpRequested=
false, std::string xmlFile=
"");
127 void unsetStopOnError();
130 void resume(
bool suspended);
135 void loadTask(
Task *task,
const WorkloadManager::RunInfo& runInfo);
137 void makeDatastreamConnections(
Task *task);
138 void beginTask(
Task *task);
140 void failTask(
Task *task,
const std::string& message);
143 bool checkBreakPoints();
146 void loadParallelTasks(
const std::vector<Task *>& tasks,
const Executor *execInst);
147 void launchTasks(
const std::vector<Task*>& tasks);
148 void launchTask(
Task *task);
150 void sleepWhileNoEventsFromAnyRunningTask();
151 void traceExec(
Task *task,
const std::string& message,
const std::string& placement);
153 virtual void sendEvent(
const std::string& event);
154 void filterTasksConsideringContainers(std::vector<Task *>& tsks);
155 static std::string ComputePlacement(
Task *zeTask);
157 static void *functionForTaskLoad(
void *);
158 static void *functionForTaskExecution(
void *);
#define YACSLIBENGINE_EXPORT
Base class for all composed nodes.
std::list< std::string > _listOfTasksToLoad
YACS::BASES::Mutex _mutexForTrace
std::vector< Task * > _tasks
bool _isWaitingEventsFromRunningTasks
bool _isRunningunderExternalControl
bool _DPLScopeSensitive
specifies if scope DynParaLoop is active or not. False by default.
YACS::ExecutionMode _execMode
std::set< Task * > _runningTasks
static size_t _threadStackSize
bool _dumpOnErrorRequested
int _nbOfConcurrentThreads
YACS::BASES::Mutex _mutexForSchedulerUpdate
YACS::BASES::Mutex & getTheMutexForSchedulerUpdate()
std::string _dumpErrorFile
std::vector< Task * > _tasksSave
YACS::BASES::Condition _condForNewTasksToPerform
std::list< std::string > _listOfBreakPoints
YACS::BASES::Semaphore _semForMaxThreads
bool getDPLScopeSensitive() const
YACS::ExecutorState _executorState
bool _stopOnErrorRequested
int _numberOfRunningTasks
void setDPLScopeSensitive(bool newVal)
bool getKeepGoingProperty() const
YACS::BASES::Mutex _mutexForNbOfConcurrentThreads
YACS::BASES::Condition _condForPilot
std::chrono::steady_clock::time_point _start
YACS::BASES::Condition _condForStepByStep
void setKeepGoingProperty(bool newVal)
YACSLOADER_EXPORT void loadState(YACS::ENGINE::Proc *p, const std::string &xmlStateFile)
Load state from a file into a Proc.