@@ -298,10 +298,10 @@ def get_simulated_time(self) -> float:
298298 return response ["time" ]
299299
300300 def create_bare_metal_compute_service (self , hostname : str ,
301- resources : dict [str , [int , float ]],
301+ resources : dict [str , [int , int ]],
302302 scratch_space : str ,
303303 property_list : dict [str , str ],
304- message_payload_list : dict [str , float ]) -> BareMetalComputeService :
304+ message_payload_list : dict [str , int ]) -> BareMetalComputeService :
305305 """
306306 Create a bare metal compute service
307307
@@ -467,7 +467,7 @@ def get_all_hostnames(self) -> List[str]:
467467
468468 def create_workflow_from_json (self , json_object : json , reference_flop_rate : str , ignore_machine_specs : bool ,
469469 redundant_dependencies : bool , ignore_cycle_creating_dependencies : bool ,
470- min_cores_per_task : float , max_cores_per_task : float , enforce_num_cores : bool ,
470+ min_cores_per_task : int , max_cores_per_task : int , enforce_num_cores : bool ,
471471 ignore_avg_cpu : bool , show_warnings : bool ) -> Workflow :
472472 """
473473 Create a workflow from a JSON file
@@ -482,10 +482,10 @@ def create_workflow_from_json(self, json_object: json, reference_flop_rate: str,
482482 :type redundant_dependencies: bool
483483 :param ignore_cycle_creating_dependencies: whether to ignore cycles when creating task dependencies
484484 :type ignore_cycle_creating_dependencies: bool
485- :param min_cores_per_task: the minimum cores for a task if not specified in the JSON
486- :type min_cores_per_task: float
487- :param max_cores_per_task: the maximum cores for a task if not specified in the JSON
488- :type max_cores_per_task: float
485+ :param min_cores_per_task: the minimum number of cores for a task if not specified in the JSON
486+ :type min_cores_per_task: int
487+ :param max_cores_per_task: the maximum number of cores for a task if not specified in the JSON
488+ :type max_cores_per_task: int
489489 :param enforce_num_cores: whether to enforce the number of cores for a task even if specified in the JSON
490490 :type enforce_num_cores: bool
491491 :param ignore_avg_cpu: whether to ignore the average CPU time information in the JSON to compute
@@ -808,14 +808,14 @@ def _task_get_max_num_cores(self, task: Task) -> int:
808808 return response ["max_num_cores" ]
809809 raise WRENCHException (response ["failure_cause" ])
810810
811- def _task_get_memory (self , task : Task ) -> float :
811+ def _task_get_memory (self , task : Task ) -> int :
812812 """
813- Get the task's memory requirement
813+ Get the task's memory requirement in bytes
814814 :param task: the task
815815 :type task: Task
816816
817817 :return: a memory footprint in bytes
818- :rtype: float
818+ :rtype: int
819819
820820 :raises WRENCHException: if there is any error in the response
821821 """
@@ -829,7 +829,7 @@ def _task_get_memory(self, task: Task) -> float:
829829 return response ["memory" ]
830830 raise WRENCHException (response ["failure_cause" ])
831831
832- def _task_get_number_of_children (self , task : Task ) -> float :
832+ def _task_get_number_of_children (self , task : Task ) -> int :
833833 """
834834 Get the task's number of children
835835 :param task: the task
@@ -850,7 +850,7 @@ def _task_get_number_of_children(self, task: Task) -> float:
850850 return response ["number_of_children" ]
851851 raise WRENCHException (response ["failure_cause" ])
852852
853- def _task_get_bottom_level (self , task : Task ) -> float :
853+ def _task_get_bottom_level (self , task : Task ) -> int :
854854 """
855855 Get the task's bottom-level
856856 :param task: the task
@@ -913,7 +913,7 @@ def _task_get_end_date(self, task: Task) -> float:
913913 return response ["time" ]
914914 raise WRENCHException (response ["failure_cause" ])
915915
916- def _add_compute_action (self , compound_job : CompoundJob , name : str , flops : float , ram : float ,
916+ def _add_compute_action (self , compound_job : CompoundJob , name : str , flops : float , ram : int ,
917917 max_num_cores : int , min_num_cores : int , parallel_model : tuple ) -> Action :
918918 """
919919 Add a compute action
@@ -924,8 +924,8 @@ def _add_compute_action(self, compound_job: CompoundJob, name: str, flops: float
924924 :type name: str
925925 :param flops: number of flops this action has
926926 :type flops: float
927- :param ram: amount of ram this action has
928- :type ram: float
927+ :param ram: amount of ram this action has in bytes
928+ :type ram: int
929929 :param max_num_cores: maximum number of cores this action can have
930930 :type max_num_cores: long
931931 :param min_num_cores: minimum number of cores this action can have
@@ -1076,7 +1076,7 @@ def _add_file_write_action(self, compound_job: CompoundJob, name: str, file: Fil
10761076 raise WRENCHException (response ["failure_cause" ])
10771077
10781078 def _add_file_read_action (self , compound_job : CompoundJob , name : str , file : File , storage_service : StorageService ,
1079- num_bytes_to_read : float ) -> Action :
1079+ num_bytes_to_read : int ) -> Action :
10801080 """
10811081 Add a file read action
10821082 :param compound_job: the action's compound job
@@ -1088,7 +1088,7 @@ def _add_file_read_action(self, compound_job: CompoundJob, name: str, file: File
10881088 :param storage_service: the storage service the file is stored in
10891089 :type storage_service: StorageService
10901090 :param num_bytes_to_read: the number of bytes to read from the file
1091- :type num_bytes_to_read: float
1091+ :type num_bytes_to_read: int
10921092 :return: the action name
10931093 :rtype: Action
10941094
@@ -1283,17 +1283,17 @@ def _add_parent_job(self, compound_job: CompoundJob, parent_compound_job: Compou
12831283 def _create_vm (self ,
12841284 service : CloudComputeService ,
12851285 num_cores : int ,
1286- ram_memory : float ,
1286+ ram_memory : int ,
12871287 property_list : dict [str , str ],
1288- message_payload_list : dict [str , float ]) -> VirtualMachine :
1288+ message_payload_list : dict [str , int ]) -> VirtualMachine :
12891289 """
12901290 Create a VM instance
12911291 :param service: the cloud compute service
12921292 :type service: CloudComputeService
12931293 :param num_cores: the number of cores for the VM
12941294 :type num_cores: int
12951295 :param ram_memory: the VM’s RAM memory_manager_service capacity
1296- :type ram_memory: float
1296+ :type ram_memory: int
12971297 :param property_list: a property list for the CloudComputeService that will run on the VM
12981298 ({} means “use all defaults”)
12991299 :type property_list: dict
@@ -1522,7 +1522,7 @@ def _get_core_flop_rates(self, cs: ComputeService) -> Dict[str, float]:
15221522 to_return [response ["hostnames" ][i ]] = response ["flop_rates" ][i ]
15231523 return to_return
15241524
1525- def _get_core_counts (self , cs : ComputeService ) -> Dict [str , float ]:
1525+ def _get_core_counts (self , cs : ComputeService ) -> Dict [str , int ]:
15261526 """
15271527 Get the map of core counts, keyed by host name
15281528 :param cs: the compute service
@@ -1541,7 +1541,7 @@ def _get_core_counts(self, cs: ComputeService) -> Dict[str, float]:
15411541 return to_return
15421542
15431543 def _workflow_create_task (self , workflow : Workflow , name : str , flops : float , min_num_cores : int , max_num_cores : int ,
1544- memory : float ) -> Task :
1544+ memory : int ) -> Task :
15451545 """
15461546 Add a task to the workflow
15471547 :param workflow: the workflow
@@ -1555,7 +1555,7 @@ def _workflow_create_task(self, workflow: Workflow, name: str, flops: float, min
15551555 :param max_num_cores: maximum number of cores
15561556 :type max_num_cores: int
15571557 :param memory: memory requirement in bytes
1558- :type memory: float
1558+ :type memory: int
15591559
15601560 :return: A task object
15611561 :rtype: Task
0 commit comments