@@ -113,14 +113,13 @@ def _parse_workflow_file(self):
113113 inputs = line .split (':' )[1 ].split ()
114114
115115 for file in itertools .chain (outputs , inputs ):
116- if not file in self .files_map :
116+ if file not in self .files_map :
117117 self .files_map [file ] = {'task_name' : None , 'children' : [], 'file' : []}
118118
119119 elif len (line .strip ()) > 0 :
120120 # task execution command
121121 prefix = line .replace ('./' , '' ).replace ('perl' , '' ).strip ().split ()[1 if 'LOCAL' in line else 0 ]
122122 task_name = "{}_ID{:07d}" .format (prefix , task_id_counter )
123- task_id_counter += 1
124123
125124 # create list of task files
126125 list_files = []
@@ -130,14 +129,18 @@ def _parse_workflow_file(self):
130129 # create task
131130 args = ' ' .join (line .replace ('LOCAL' , '' ).replace ('perl' , '' ).strip ().split ())
132131 task = Task (name = task_name ,
132+ task_id = "ID{:07d}" .format (task_id_counter ),
133+ category = prefix ,
133134 task_type = TaskType .COMPUTE ,
134135 runtime = 0 ,
136+ program = prefix ,
135137 args = args .split (),
136138 cores = 1 ,
137139 files = list_files ,
138140 logger = self .logger )
139141 self .workflow .add_node (task_name , task = task )
140142 self .args_map [args ] = task
143+ task_id_counter += 1
141144
142145 # adding edges
143146 for file in self .files_map :
@@ -219,7 +222,7 @@ def _parse_resource_monitor_logs(self):
219222 # task
220223 task = self .args_map [data ['command' ].replace ('perl' , '' ).strip ()]
221224 task .runtime = float (data ['wall_time' ][0 ])
222- task .cores = int (data ['cores' ][0 ])
225+ task .cores = float (data ['cores' ][0 ])
223226 task .memory = int (data ['memory' ][0 ]) * 1000 # MB to KB
224227 task .bytes_read = int (data ['bytes_read' ][0 ] * 1000 ) # MB to KB
225228 task .bytes_written = int (data ['bytes_written' ][0 ] * 1000 ) # MB to KB
0 commit comments