Skip to content

Commit 43ca19d

Browse files
committed
fix: wfbench.py gets mem in megabytes
1 parent c0ede14 commit 43ca19d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

wfcommons/wfbench/bench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def create_benchmark_from_synthetic_workflow(
162162
)
163163
task.cores = task_cores + 1
164164
if task_memory:
165-
task.memory = task_memory
165+
task.memory = task_memory * 1024 * 1024 # megabytes to bytes
166166

167167
# create data footprint
168168
for task in self.workflow.tasks.values():

wfcommons/wfbench/wfbench.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,10 @@ def main():
195195

196196
print(f"[WfBench] Starting {args.name} Benchmark\n")
197197

198+
mem_bytes = args.mem * 1024 * 1024 if args.mem else None
199+
198200
if args.out:
199-
io_read_benchmark_user_input_data_size(other, memory_limit=args.mem)
201+
io_read_benchmark_user_input_data_size(other, memory_limit=mem_bytes)
200202

201203
if args.gpu_work:
202204
print("[WfBench] Starting GPU Benchmark...")
@@ -234,7 +236,7 @@ def main():
234236

235237
if args.out:
236238
outputs = json.loads(args.out.replace("'", '"'))
237-
io_write_benchmark_user_input_data_size(outputs, memory_limit=args.mem)
239+
io_write_benchmark_user_input_data_size(outputs, memory_limit=mem_bytes)
238240

239241
if core:
240242
unlock_core(path_locked, path_cores, core)

0 commit comments

Comments
 (0)