wrench.compute_action

class wrench.compute_action.ComputeAction(simulation, compound_job: CompoundJob, name: str, flops: float, ram: int, min_num_cores: int, max_num_cores: int, parallel_model: tuple)

Bases: Action

WRENCH Action class

class ActionState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

COMPLETED = 3
FAILED = 5
KILLED = 4
NOT_READY = 0
READY = 1
STARTED = 2
get_end_date() float

Get the action’s end date

Returns:

a date (or -1 if not ended)

Return type:

float

get_failure_cause() str

Get the action’s failure cause

Returns:

a failure cause (or None if no failure has occurred)

Return type:

str

get_flops() float

Get flops

Returns:

flops

Return type:

float

get_job() CompoundJob

Get the job that this task belongs to

Returns:

a list of task objects

Return type:

List[Task]

get_max_num_cores() int

Get this actions maximum amount of cores

Returns:

Maximum amount of cores

Return type:

long

get_min_num_cores() int

Get this actions minimum amount of cores

Returns:

Minimum amount of cores

Return type:

long

get_min_ram_footprint() int

Minimum amount of ram needed for this action

Returns:

Minimum amount of ram needed

Return type:

int

get_name() str

Get the name

get_parallel_model() Tuple[str, float]

Returns type of parallel model and settings for it

Returns:

the type of parallel model and a number that determines its configuration

Return type:

tuple[str, float]

get_start_date() float

Get the action’s start date

Returns:

a date (or -1 if not started)

Return type:

float

get_state() ActionState

Get the state of the action