@@ -16,8 +16,7 @@ def __init__(self, Recipe: Type[WorkflowRecipe], num_tasks: int) -> None:
1616
1717 def create (self ,
1818 save_dir : pathlib .Path ,
19- cpu : int = 50 ,
20- mem : int = 50 ,
19+ percent_cpu : float = 0.5 ,
2120 data_footprint : int = 100 ,
2221 test_mode : str = "seqwr" ,
2322 mem_total_size : str = "1000000G" ,
@@ -30,9 +29,6 @@ def create(self,
3029 threads : int = 2 , #cpu threads
3130 verbose : bool = False ) -> Dict :
3231
33- self .check_percent (cpu , mem )
34- cpu_threads = cpu / 10
35- mem_threads = mem / 10
3632
3733 if verbose :
3834 print ("Checking if the sysbench is installed." )
@@ -61,9 +57,8 @@ def create(self,
6157 f"--memory-block-size={ block_size } " ,
6258 f"--memory-scope={ scope } " ,
6359 f"--memory-total-size={ mem_total_size } " ,
64- f"memory-threads={ mem_threads } "
6560 f"--cpu-max-prime={ max_prime } " ,
66- f"cpu-threads= { cpu_threads } " ,
61+ f"--percent_cpu= { percent_cpu } " ,
6762 f"--time={ max_time } " ]
6863
6964 for job in wf ["workflow" ]["jobs" ]:
@@ -157,15 +152,6 @@ def add_io_to_json(self, wf: Dict[str, Dict], file_size: int) -> None:
157152 )
158153
159154
160- def check_percent (self , cpu :int , mem :int ):
161- if not cpu % 10 :
162- raise ValueError ("CPU percentage must be multiple of 10." )
163-
164- if not mem % 10 :
165- raise ValueError ("Memory percentage must be multiple of 10." )
166-
167- if cpu + mem != 100 :
168- raise ValueError ("CPU + Memory must be 100." )
169155
170156 def _check_sysbench (self ,):
171157 proc = subprocess .Popen (["which" , "sysbench" ], stdout = subprocess .PIPE )
0 commit comments