wrench.workflow
- class wrench.workflow.Workflow(simulation: Simulation, name: str)
Bases:
SimulationItemWRENCH Workflow class
- add_task(name: str, flops: float, min_num_cores: int, max_num_cores: int, memory: int) Task
Add a task to the workflow
- Parameters:
name (str) – task name
flops (float) – number of flops
min_num_cores (int) – minimum number of cores
max_num_cores (int) – maximum number of cores
memory (int) – memory requirement in bytes
- Returns:
A task object
- Return type:
- Raises:
WRENCHException – if there is any error in the response
- get_input_files() List[File]
Get the list of input files of the workflow
- Returns:
A dictionary of Task objects where task names are keys
- Return type:
List[File]
- get_name() str
Get the name
- get_ready_tasks() List[Task]
Get the list of ready tasks in the workflow
- Returns:
A list of Task objects
- Return type:
List[Task]
- get_tasks() dict[str, Task]
Get the tasks in the workflow
- Returns:
A dictionary of Task objects where task names are keys
- Return type:
dict[str, Task]
- is_done() bool
Determine whether the workflow is done
- Returns:
True if the workflow is done, false otherwise
- Return type:
bool