Skip to content

Commit d8966a2

Browse files
committed
adding flowcept and IO for swift/t
1 parent b3c5bed commit d8966a2

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

wfcommons/wfbench/translator/swift_t.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def _add_tasks(self, category: str) -> None:
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" \
220220
f" string cmd_{self.cmd_counter} = sprintf(command, \"{self.cpu_benchmark}\", \"{category}\", {args});\n" \
221-
f" string co_{self.cmd_counter} = python(cmd_{self.cmd_counter});\n" \
221+
f" string co_{self.cmd_counter} = python_persist(cmd_{self.cmd_counter});\n" \
222222
f" string of_{self.cmd_counter} = sprintf(\"0%s\", co_{self.cmd_counter});\n" \
223223
f" {category}__out[i] = string2int(of_{self.cmd_counter});\n" \
224224
"}\n\n"
@@ -227,7 +227,7 @@ def _add_tasks(self, category: str) -> None:
227227
args = args.replace(
228228
", of", f", \"{self.output_folder.absolute()}/data/{category}_0_output.txt\"").replace("[i]", "[0]")
229229
self.script += f"string cmd_{self.cmd_counter} = sprintf(command, \"{self.cpu_benchmark}\", \"{category}\", {args});\n" \
230-
f"string co_{self.cmd_counter} = python(cmd_{self.cmd_counter});\n" \
230+
f"string co_{self.cmd_counter} = python_persist(cmd_{self.cmd_counter});\n" \
231231
f"string of_{self.cmd_counter} = sprintf(\"0%s\", co_{self.cmd_counter});\n" \
232232
f"{category}__out[0] = string2int(of_{self.cmd_counter});\n\n"
233233

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import unix;
66

77
string flowcept_start =
88
"""
9-
logging.info("Running with Flowcept.")
109
workflow_id = "%s"
1110
from flowcept import Flowcept, FlowceptTask
1211
flowcept_agent = Flowcept(workflow_id=workflow_id,
@@ -16,13 +15,13 @@ flowcept_agent.start()
1615
flowcept_task = FlowceptTask(workflow_id=workflow_id, used={
1716
"workflow_id": workflow_id
1817
})
19-
"""
18+
""";
2019

2120
string flowcept_stop =
2221
"""
2322
flowcept_task.end()
2423
flowcept_agent.stop()
25-
"""
24+
""";
2625

2726
string command =
2827
"""

0 commit comments

Comments
 (0)