@@ -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 " \
@@ -231,7 +232,7 @@ def _add_tasks(self, category: str) -> None:
231232 self .out_files .add (out_file )
232233 args = args .replace (
233234 ", of" , f", \" { out_file } \" " ).replace ("[i]" , "[0]" )
234- self .script += f"string cmd_{ self .cmd_counter } = sprintf(command, \" { self .cpu_benchmark } \" , \" { category } \" , { args } );\n " \
235+ self .script += f"string cmd_{ self .cmd_counter } = sprintf(command, \" { self .cpu_benchmark } \" , \" { category } _ { self . cmd_counter } \" , { args } );\n " \
235236 f"string co_{ self .cmd_counter } = python_persist(cmd_{ self .cmd_counter } );\n " \
236237 f"string of_{ self .cmd_counter } = sprintf(\" 0%s\" , co_{ self .cmd_counter } );\n " \
237238 f"{ category } __out[0] = string2int(of_{ self .cmd_counter } );\n \n "
0 commit comments