WRENCH
1.10
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 (WorkflowFile *file) |
Add an input file to the task. More... | |
void | addOutputFile (WorkflowFile *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< WorkflowTask * > | getChildren () const |
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< WorkflowFile * > | getInputFiles () const |
Get the list of input WorkflowFile objects for the task. More... | |
WorkflowJob * | 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 () const |
Get the number of children of a task. More... | |
unsigned long | getNumberOfParents () const |
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< WorkflowFile * > | getOutputFiles () const |
Get the list of output WorkflowFile objects for the task. More... | |
std::shared_ptr< ParallelModel > | getParallelModel () const |
Get the task's parallel model. More... | |
std::vector< WorkflowTask * > | getParents () const |
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... | |
double | getStartDate () const |
Get the task's most recent start date. More... | |
WorkflowTask::State | getState () const |
Get the state of the task. More... | |
double | getTerminationDate () const |
Get the tasks's most recent termination date (when it was explicitly requested to be terminated by the WMS) 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... | |
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 | ( | WorkflowFile * | file | ) |
Add an input file to the task.
file | the file |
std::invalid_argument |
void wrench::WorkflowTask::addOutputFile | ( | WorkflowFile * | 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< WorkflowTask * > wrench::WorkflowTask::getChildren | ( | ) | const |
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< WorkflowFile * > wrench::WorkflowTask::getInputFiles | ( | ) | const |
Get the list of input WorkflowFile objects for the task.
WorkflowJob * 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 | ( | ) | const |
Get the number of children of a task.
unsigned long wrench::WorkflowTask::getNumberOfParents | ( | ) | const |
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< WorkflowFile * > wrench::WorkflowTask::getOutputFiles | ( | ) | const |
Get the list of output WorkflowFile objects for the task.
std::shared_ptr< ParallelModel > wrench::WorkflowTask::getParallelModel | ( | ) | const |
Get the task's parallel model.
std::vector< WorkflowTask * > wrench::WorkflowTask::getParents | ( | ) | const |
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.
double wrench::WorkflowTask::getTerminationDate | ( | ) | const |
Get the tasks's most recent termination date (when it was explicitly requested to be terminated by the WMS)
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)
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 |