Skip to content

Commit 7b770e9

Browse files
committed
fix: percent-cpu must be at least 0.1 (equivalent to one thread)
1 parent 39a703e commit 7b770e9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

wfcommons/wfbench/bench.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def create_benchmark_from_synthetic_workflow(
135135
task_runtime_factor = task.runtime / task_max_runtimes[task.category]
136136
# scale argument parameters to achieve a runtime distribution
137137
task_percent_cpu = percent_cpu[task.category] * task_runtime_factor if isinstance(percent_cpu, dict) else percent_cpu * runtime_factor
138+
task_percent_cpu = max(0.1, percent_cpu) # set minimum to 0.1 which is equivalent to 1 thread in wfbench.py
138139
if cpu_work is not None:
139140
task_cpu_work = cpu_work[task.category] * task_runtime_factor if isinstance(cpu_work, dict) else cpu_work * runtime_factor
140141
task_cpu_work = int(task_cpu_work)

0 commit comments

Comments
 (0)