Workflow.h
52 void addControlDependency(WorkflowTask *src, WorkflowTask *dest, bool redundant_dependencies = false);
132 ComputeService *parent_compute_service; // The compute service to which the job was submitted, if any
133 Simulation *simulation; // a ptr to the simulation so that the simulation can obtain simulation timestamps for workflow tasks
std::string getCallbackMailbox()
Get the mailbox name associated to this workflow.
Definition: Workflow.cpp:398
std::map< std::string, WorkflowFile * > getInputFiles()
Retrieve a map (indexed by file id) of input files for a workflow (i.e., those files that are input t...
Definition: Workflow.cpp:479
void loadFromJSON(const std::string &filename, const std::string &reference_flop_rate, bool redundant_dependencies=false)
Create a workflow based on a JSON file.
Definition: Workflow.cpp:619
void addControlDependency(WorkflowTask *src, WorkflowTask *dest, bool redundant_dependencies=false)
Create a control dependency between two workflow tasks. Will not do anything if there is already a pa...
Definition: Workflow.cpp:135
WorkflowFile * addFile(std::string, double)
Add a new file to the workflow.
Definition: Workflow.cpp:165
bool isDone()
Returns whether all tasks are complete.
Definition: Workflow.cpp:312
unsigned long getNumLevels()
Returns the number of levels in the workflow.
Definition: Workflow.cpp:801
std::unique_ptr< WorkflowExecutionEvent > waitForNextExecutionEvent()
Wait for the next worklow execution event.
Definition: Workflow.cpp:389
std::vector< WorkflowTask * > getReadyTasks()
Get a vector of ready tasks.
Definition: Workflow.cpp:258
WorkflowTask * getTaskByID(const std::string &id)
Find a WorkflowTask based on its ID.
Definition: Workflow.cpp:118
void removeTask(WorkflowTask *task)
Remove a task from the workflow. WARNING: this method de-allocated memory for the task...
Definition: Workflow.cpp:86
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
void exportToEPS(std::string)
Output the workflow's dependency graph to EPS.
Definition: Workflow.cpp:208
std::vector< WorkflowTask * > getTasksInTopLevelRange(unsigned long min, unsigned long max)
Returns all tasks with top-levels in a range.
Definition: Workflow.cpp:787
double getCompletionDate()
Sets the number of levels in the workflow.
Definition: Workflow.cpp:827
void loadFromDAXorJSON(const std::string &filename, const std::string &reference_flop_rate, bool redundant_dependencies=false)
Create a workflow based on a DAX or a JSON file.
Definition: Workflow.cpp:755
WorkflowTask * addTask(std::string, double flops, unsigned long min_num_cores, unsigned long max_num_cores, double parallel_efficiency, double memory_requirement, WorkflowTask::TaskType type=WorkflowTask::TaskType::COMPUTE)
Create and add a new computational task to the workflow.
Definition: Workflow.cpp:42
std::map< std::string, std::vector< WorkflowTask * > > getReadyClusters()
Get a map of clusters composed of ready tasks.
Definition: Workflow.cpp:278
static double getSumFlops(std::vector< WorkflowTask *> tasks)
Get the total number of flops for a list of tasks.
Definition: Workflow.cpp:496
void loadFromDAX(const std::string &filename, const std::string &reference_flop_rate, bool redundant_dependencies=false)
Create a workflow based on a DAX file.
Definition: Workflow.cpp:518
unsigned long getNumberOfTasks()
Get the number of tasks in the workflow.
Definition: Workflow.cpp:223
std::vector< WorkflowTask * > getTaskChildren(const WorkflowTask *task)
Get the list of children for a task.
Definition: Workflow.cpp:355
std::vector< WorkflowTask * > getTaskParents(const WorkflowTask *task)
Get the list of parents for a task.
Definition: Workflow.cpp:373
WorkflowFile * getFileByID(const std::string &id)
Find a WorkflowFile based on its ID.
Definition: Workflow.cpp:194
std::vector< WorkflowTask * > getTasks()
Get the list of all tasks in the workflow.
Definition: Workflow.cpp:327
std::vector< WorkflowFile * > getFiles()
Get the list of all files in the workflow.
Definition: Workflow.cpp:340
Definition: TerminalOutput.cpp:15