wrench.cloud_compute_service
- class wrench.cloud_compute_service.CloudComputeService(simulation, name: str)
Bases:
ComputeServiceWRENCH Cloud Compute Service class
- create_vm(num_cores: int, ram_memory: int, property_list: dict[str, str], message_payload_list: dict[str, int]) VirtualMachine
Create a new virtual machine instance on the compute service
- Parameters:
num_cores (int) – number of cores in the virtual machine
ram_memory (int) – RAM size in bytes
property_list (dict) – a property list ({} means “use all defaults”)
message_payload_list (dict) – a message payload list ({} means “use all defaults”)
- Returns:
a VirtualMachine object
- Return type:
- destroy_vm(vm: VirtualMachine) None
Destroy a new virtual machine instance on the compute service
- Parameters:
vm (VirtualMachine) – A virtual machine
- get_core_counts() Dict[str, int]
Get the map of core counts, keyed by host name
- Returns:
A dictionary of core counts
- Return type:
Dict[str, int]
- get_core_flop_rates() Dict[str, float]
Get the map of core speeds, keyed by host name
- Returns:
A dictionary of core speeds
- Return type:
Dict[str, float]
- get_name() str
Get the name
- submit_compound_job(compound_job: CompoundJob) None
Submit a compound job to the compute service
- Parameters:
compound_job (CompoundJob) – the compound job
- submit_standard_job(standard_job: StandardJob) None
Submit a standard job to the compute service
- Parameters:
standard_job (StandardJob) – the standard job
- supports_compound_jobs() bool
Determine whether the compute service supports compound jobs
- Returns:
True if compound jobs are supported, false otherwise
- Return type:
bool
- supports_pilot_jobs() bool
Determine whether the compute service supports pilot jobs
- Returns:
True if pilot jobs are supported, false otherwise
- Return type:
bool
- supports_standard_jobs() bool
Determine whether the compute service supports standard jobs
- Returns:
True if standard jobs are supported, false otherwise
- Return type:
bool