File tree Expand file tree Collapse file tree
wfcommons/wfbench/translator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ def __init__(self,
4343 self .files_map = {}
4444 self .tasks_map = {}
4545 self .cmd_counter = 1
46+ self .last_file = ""
4647
4748 # find applications
4849 self .apps = []
@@ -102,7 +103,8 @@ def translate(self, output_folder: pathlib.Path) -> None:
102103
103104 # flowcept end
104105 if self .workflow .workflow_id :
105- self .script += f"string fc_stop = sprintf(flowcept_stop, dep_{ self .cmd_counter - 1 } );\n " \
106+ self .script += f"int dep_{ self .cmd_counter } = { self .last_file } ;\n " \
107+ f"string fc_stop = sprintf(flowcept_stop, dep_{ self .cmd_counter } );\n " \
106108 "python_persist(fc_stop);"
107109
108110 run_workflow_code = self ._merge_codelines ("templates/swift_t_templates/workflow.swift" , self .script )
@@ -223,6 +225,7 @@ def _add_tasks(self, category: str) -> None:
223225 f" string of_{ self .cmd_counter } = sprintf(\" 0%s\" , co_{ self .cmd_counter } );\n " \
224226 f" { category } __out[i] = string2int(of_{ self .cmd_counter } );\n " \
225227 "}\n \n "
228+ self .last_file = f"{ category } __out[{ num_tasks - 1 } ]"
226229
227230 else :
228231 args = args .replace (
@@ -231,5 +234,6 @@ def _add_tasks(self, category: str) -> None:
231234 f"string co_{ self .cmd_counter } = python_persist(cmd_{ self .cmd_counter } );\n " \
232235 f"string of_{ self .cmd_counter } = sprintf(\" 0%s\" , co_{ self .cmd_counter } );\n " \
233236 f"{ category } __out[0] = string2int(of_{ self .cmd_counter } );\n \n "
237+ self .last_file = f"{ category } __out[0]"
234238
235239 self .cmd_counter += 1
You can’t perform that action at this time.
0 commit comments