WRENCH
1.11
Cyberinfrastructure Simulation Workbench
|
Overview | Installation | Getting Started | WRENCH 101 | WRENCH 102 |
A computational task in a Workflow. More...
#include <WorkflowTask.h>
Public Types | |
enum | State { NOT_READY, READY, PENDING, COMPLETED, UNKNOWN } |
Task states. More... | |
Public Member Functions | |
void | addInputFile (std::shared_ptr< DataFile >file) |
Add an input file to the task. More... | |
void | addOutputFile (std::shared_ptr< DataFile >file) |
Add an output file to the task. More... | |
double | getAverageCPU () const |
Get the task average CPU usage. More... | |
unsigned long | getBytesRead () const |
Get the number of bytes read by the task. More... | |
unsigned long | getBytesWritten () const |
Get the number of bytes written by the task. More... | |
std::vector< std::shared_ptr< WorkflowTask > > | getChildren () |
Get the children of a task. More... | |
std::string | getClusterID () const |
Get the cluster Id for the task. More... | |
std::string | getColor () const |
Get the task's color ("" if none) More... | |
double | getComputationEndDate () const |
Get the task's most recent computation end date. More... | |
double | getComputationStartDate () const |
Get the tasks's most recent computation start date. More... | |
double | getEndDate () const |
Get the task's most recent end date. More... | |
std::stack< WorkflowTaskExecution > | getExecutionHistory () const |
Get the execution history of this task. More... | |
std::string | getExecutionHost () const |
Returns the name of the host on which the task has most recently been executed, or "" if the task has never been executed yet. Could be a virtual hostname. More... | |
unsigned int | getFailureCount () |
Get the number of times a task has failed. More... | |
double | getFailureDate () const |
Get the task's most recent failure date. More... | |
double | getFlops () const |
Get the number of flops of the task. More... | |
const std::string & | getID () const |
Get the id of the task. More... | |
std::vector< std::shared_ptr< DataFile > > | getInputFiles () const |
Get the list of input DataFile objects for the task. More... | |
Job * | getJob () const |
Get the task's containing job. More... | |
unsigned long | getMaxNumCores () const |
Get the maximum number of cores that the task can use. More... | |
double | getMemoryRequirement () const |
Get the memory_manager_service requirement of the task. More... | |
unsigned long | getMinNumCores () const |
Get the minimum number of cores required for running the task. More... | |
unsigned long | getNumberOfChildren () |
Get the number of children of a task. More... | |
unsigned long | getNumberOfParents () |
Get the number of parents of a task. More... | |
unsigned long | getNumCoresAllocated () const |
Returns the number of cores allocated for this task's most recent execution or 0 if an execution attempt was never made. More... | |
std::vector< std::shared_ptr< DataFile > > | getOutputFiles () const |
Get the list of output DataFile objects for the task. More... | |
std::shared_ptr< ParallelModel > | getParallelModel () const |
Get the task's parallel model. More... | |
std::vector< std::shared_ptr< WorkflowTask > > | getParents () |
Get the parents of a task. More... | |
std::string | getPhysicalExecutionHost () const |
Returns the name of the PHYSICAL host on which the task has most recently been executed, or "" if the task has never been executed yet. More... | |
unsigned long | getPriority () const |
Get the task priority. By default, priority is 0. More... | |
double | getReadInputEndDate () const |
Get the task's most recent read input end date. More... | |
double | getReadInputStartDate () const |
Get the task's most recent read input start date. More... | |
std::shared_ptr< WorkflowTask > | getSharedPtr () |
double | getStartDate () const |
Get the task's most recent start date. More... | |
WorkflowTask::State | getState () const |
Get the state of the task. More... | |
std::string | getStateAsString () const |
Get the state of the task as a string. More... | |
double | getTerminationDate () const |
Get the tasks's most recent termination date (when it was explicitly requested to be terminated by the execution controller) More... | |
unsigned long | getTopLevel () const |
Returns the task's top level (max number of hops on a reverse path up to an entry task. Entry tasks have a top-level of 0) More... | |
std::shared_ptr< Workflow > | getWorkflow () const |
Get the workflow that contains the task. More... | |
double | getWriteOutputEndDate () const |
Get the task's most recent write output end date. More... | |
double | getWriteOutputStartDate () const |
Get the task's most recent write output start date. More... | |
void | setAverageCPU (double) |
Set the task average CPU usage. More... | |
void | setBytesRead (unsigned long) |
Set the number of bytes read by the task. More... | |
void | setBytesWritten (unsigned long) |
Set the number of bytes written by the task. More... | |
void | setClusterID (std::string) |
Set the cluster id for the task. More... | |
void | setColor (std::string) |
Set the task's color. More... | |
void | setParallelModel (std::shared_ptr< ParallelModel > model) |
Set the task's parallel model. More... | |
void | setPriority (long) |
Set the task priority. More... | |
Static Public Member Functions | |
static std::string | stateToString (WorkflowTask::State state) |
Convert task state to a string (useful for output, debugging, logging, etc.) More... | |
A computational task in a Workflow.
void wrench::WorkflowTask::addInputFile | ( | std::shared_ptr< DataFile > | file | ) |
Add an input file to the task.
file | the file |
std::invalid_argument |
void wrench::WorkflowTask::addOutputFile | ( | std::shared_ptr< DataFile > | file | ) |
Add an output file to the task.
file | the file |
double wrench::WorkflowTask::getAverageCPU | ( | ) | const |
Get the task average CPU usage.
unsigned long wrench::WorkflowTask::getBytesRead | ( | ) | const |
Get the number of bytes read by the task.
unsigned long wrench::WorkflowTask::getBytesWritten | ( | ) | const |
Get the number of bytes written by the task.
std::vector< std::shared_ptr< WorkflowTask > > wrench::WorkflowTask::getChildren | ( | ) |
Get the children of a task.
std::string wrench::WorkflowTask::getClusterID | ( | ) | const |
Get the cluster Id for the task.
std::string wrench::WorkflowTask::getColor | ( | ) | const |
Get the task's color ("" if none)
double wrench::WorkflowTask::getComputationEndDate | ( | ) | const |
Get the task's most recent computation end date.
double wrench::WorkflowTask::getComputationStartDate | ( | ) | const |
Get the tasks's most recent computation start date.
double wrench::WorkflowTask::getEndDate | ( | ) | const |
Get the task's most recent end date.
std::stack< WorkflowTask::WorkflowTaskExecution > wrench::WorkflowTask::getExecutionHistory | ( | ) | const |
Get the execution history of this task.
std::string wrench::WorkflowTask::getExecutionHost | ( | ) | const |
Returns the name of the host on which the task has most recently been executed, or "" if the task has never been executed yet. Could be a virtual hostname.
unsigned int wrench::WorkflowTask::getFailureCount | ( | ) |
Get the number of times a task has failed.
double wrench::WorkflowTask::getFailureDate | ( | ) | const |
Get the task's most recent failure date.
double wrench::WorkflowTask::getFlops | ( | ) | const |
Get the number of flops of the task.
const std::string & wrench::WorkflowTask::getID | ( | ) | const |
Get the id of the task.
std::vector< std::shared_ptr< DataFile > > wrench::WorkflowTask::getInputFiles | ( | ) | const |
Get the list of input DataFile objects for the task.
Job * wrench::WorkflowTask::getJob | ( | ) | const |
Get the task's containing job.
unsigned long wrench::WorkflowTask::getMaxNumCores | ( | ) | const |
Get the maximum number of cores that the task can use.
double wrench::WorkflowTask::getMemoryRequirement | ( | ) | const |
Get the memory_manager_service requirement of the task.
unsigned long wrench::WorkflowTask::getMinNumCores | ( | ) | const |
Get the minimum number of cores required for running the task.
unsigned long wrench::WorkflowTask::getNumberOfChildren | ( | ) |
Get the number of children of a task.
unsigned long wrench::WorkflowTask::getNumberOfParents | ( | ) |
Get the number of parents of a task.
unsigned long wrench::WorkflowTask::getNumCoresAllocated | ( | ) | const |
Returns the number of cores allocated for this task's most recent execution or 0 if an execution attempt was never made.
std::vector< std::shared_ptr< DataFile > > wrench::WorkflowTask::getOutputFiles | ( | ) | const |
Get the list of output DataFile objects for the task.
std::shared_ptr< ParallelModel > wrench::WorkflowTask::getParallelModel | ( | ) | const |
Get the task's parallel model.
std::vector< std::shared_ptr< WorkflowTask > > wrench::WorkflowTask::getParents | ( | ) |
Get the parents of a task.
std::string wrench::WorkflowTask::getPhysicalExecutionHost | ( | ) | const |
Returns the name of the PHYSICAL host on which the task has most recently been executed, or "" if the task has never been executed yet.
unsigned long wrench::WorkflowTask::getPriority | ( | ) | const |
Get the task priority. By default, priority is 0.
double wrench::WorkflowTask::getReadInputEndDate | ( | ) | const |
Get the task's most recent read input end date.
double wrench::WorkflowTask::getReadInputStartDate | ( | ) | const |
Get the task's most recent read input start date.
double wrench::WorkflowTask::getStartDate | ( | ) | const |
Get the task's most recent start date.
WorkflowTask::State wrench::WorkflowTask::getState | ( | ) | const |
Get the state of the task.
std::string wrench::WorkflowTask::getStateAsString | ( | ) | const |
Get the state of the task as a string.
double wrench::WorkflowTask::getTerminationDate | ( | ) | const |
Get the tasks's most recent termination date (when it was explicitly requested to be terminated by the execution controller)
unsigned long wrench::WorkflowTask::getTopLevel | ( | ) | const |
Returns the task's top level (max number of hops on a reverse path up to an entry task. Entry tasks have a top-level of 0)
std::shared_ptr< Workflow > wrench::WorkflowTask::getWorkflow | ( | ) | const |
Get the workflow that contains the task.
double wrench::WorkflowTask::getWriteOutputEndDate | ( | ) | const |
Get the task's most recent write output end date.
double wrench::WorkflowTask::getWriteOutputStartDate | ( | ) | const |
Get the task's most recent write output start date.
void wrench::WorkflowTask::setAverageCPU | ( | double | average_cpu | ) |
Set the task average CPU usage.
average_cpu | task average CPU usage |
void wrench::WorkflowTask::setBytesRead | ( | unsigned long | bytes_read | ) |
Set the number of bytes read by the task.
bytes_read | number of bytes read by the task in KB |
void wrench::WorkflowTask::setBytesWritten | ( | unsigned long | bytes_written | ) |
Set the number of bytes written by the task.
bytes_written | number of bytes written by the task in KB |
void wrench::WorkflowTask::setClusterID | ( | std::string | id | ) |
Set the cluster id for the task.
id | cluster id the task belongs to |
void wrench::WorkflowTask::setColor | ( | std::string | color | ) |
Set the task's color.
color | A color string in "#rrggbb" format |
void wrench::WorkflowTask::setParallelModel | ( | std::shared_ptr< ParallelModel > | model | ) |
Set the task's parallel model.
model | a parallel model |
void wrench::WorkflowTask::setPriority | ( | long | priority | ) |
Set the task priority.
priority | task priority |
|
static |
Convert task state to a string (useful for output, debugging, logging, etc.)
Get a task internal state as a string.
state | task state |
internal_state | the internal state |