wrench::WorkflowTask

class WorkflowTask : public std::enable_shared_from_this<WorkflowTask>

A computational task in a Workflow.

Public Functions

void addInputFile(const std::shared_ptr<DataFile> &file)

Add an input file to the task.

Parameters:

file – the file

Throws:

std::invalid_argument

void addOutputFile(const std::shared_ptr<DataFile> &file)

Add an output file to the task.

Parameters:

file – the file

std::vector<std::shared_ptr<WorkflowTask>> getChildren()

Get the children of a task.

Returns:

a list of workflow tasks

unsigned int getFailureCount() const

Get the number of times a task has failed.

Returns:

a failure count

double getFlops() const

Get the number of flops of the task.

Returns:

a number of flops

const std::string &getID() const

Get the id of the task.

Returns:

an id as a string

unsigned long getMaxNumCores() const

Get the maximum number of cores that the task can use.

Returns:

a number of cores

double getMemoryRequirement() const

Get the memory_manager_service requirement of the task.

Returns:

a memory_manager_service requirement (in bytes)

unsigned long getMinNumCores() const

Get the minimum number of cores required for running the task.

Returns:

a number of cores

unsigned long getNumberOfChildren()

Get the number of children of a task.

Returns:

a number of children

unsigned long getNumberOfParents()

Get the number of parents of a task.

Returns:

a number of parents

std::shared_ptr<ParallelModel> getParallelModel() const

Get the task’s parallel model.

Returns:

the parallel model

std::vector<std::shared_ptr<WorkflowTask>> getParents()

Get the parents of a task.

Returns:

a list of workflow tasks

inline std::shared_ptr<WorkflowTask> getSharedPtr()

Retrieved the official shared pointer for this object.

Returns:

a shared pointer

void setFlops(double f)

Set the number of f of the task (to be used only in very specific cases in which it is guaranteed that changing a task’s work after that task has been created is a valid thing to do)

Parameters:

f – the number of f

void setParallelModel(std::shared_ptr<ParallelModel> model)

Set the task’s parallel model.

Parameters:

model – a parallel model