@@ -76,7 +76,8 @@ def translate(self, output_folder: pathlib.Path) -> None:
7676 in_count = 0
7777 self .output_folder = output_folder
7878 self .cpu_benchmark = output_folder .joinpath ("./bin/cpu-benchmark" ).absolute ()
79- self .script = "string root_in_files[];\n "
79+ self .script = f"string fs = sprintf(flowcept_start, \" { self .workflow .workflow_id } \" );\n string fss = python_persist(fs);\n \n " if self .workflow .workflow_id else ""
80+ self .script += "string root_in_files[];\n "
8081
8182 for task_name in self .root_task_names :
8283 task = self .tasks [task_name ]
@@ -99,6 +100,10 @@ def translate(self, output_folder: pathlib.Path) -> None:
99100 for category in self .categories_list :
100101 self ._add_tasks (category )
101102
103+ # flowcept stop
104+ # if self.workflow.workflow_id:
105+ # self.script += "string fss = sprintf(flowcept_stop);\npython_persist(fss);"
106+
102107 run_workflow_code = self ._merge_codelines ("templates/swift_t_templates/workflow.swift" , self .script )
103108
104109 # write benchmark files
@@ -206,7 +211,7 @@ def _add_tasks(self, category: str) -> None:
206211 in_str = ""
207212 self .script += f"int dep_{ self .cmd_counter } = { cats } ;\n "
208213 args += f", dep_{ self .cmd_counter } "
209- args += f", \" { self .workflow .workflow_id } \" " if self .workflow .workflow_id else ", \" \" "
214+ args += f", \" { self .workflow .workflow_id } \" , fss " if self .workflow .workflow_id else ", \" \" "
210215 self .script += f"string { category } _in = \" { self .output_folder .absolute ()} /data/{ in_str } \" ;\n "
211216
212217 if num_tasks > 1 :
0 commit comments