Skip to content

Commit cef6d88

Browse files
committed
swift/t with flowcept
1 parent 69723a6 commit cef6d88

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

wfcommons/wfbench/translator/swift_t.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ def _add_tasks(self, category: str) -> None:
217217
if num_tasks > 1:
218218
self.script += f"foreach i in [0:{num_tasks - 1}] {{\n" \
219219
f" string of = sprintf(\"{self.output_folder.absolute()}/data/{category}_%i_output.txt\", i);\n" \
220-
f" string cmd_{self.cmd_counter} = sprintf(command, \"{self.cpu_benchmark}\", \"{category}\", {args});\n" \
220+
f" string task_id = \"{category}_\" + i;\n" \
221+
f" string cmd_{self.cmd_counter} = sprintf(command, \"{self.cpu_benchmark}\", task_id, {args});\n" \
221222
f" string co_{self.cmd_counter} = python_persist(cmd_{self.cmd_counter});\n" \
222223
f" string of_{self.cmd_counter} = sprintf(\"0%s\", co_{self.cmd_counter});\n" \
223224
f" {category}__out[i] = string2int(of_{self.cmd_counter});\n" \

wfcommons/wfbench/translator/templates/swift_t_templates/workflow.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if 'workflow_id':
9898
bundle_exec_id=workflow_id,
9999
start_persistence=False, save_workflow=False)
100100
fc.start()
101-
fc_task = FlowceptTask(workflow_id=workflow_id, used={
101+
fc_task = FlowceptTask(workflow_id=workflow_id, task_id=task_name, used={
102102
'workflow_id': workflow_id,
103103
'name': task_name,
104104
'percent-cpu': percent_cpu,

0 commit comments

Comments
 (0)