Skip to content

Commit e9d964f

Browse files
committed
Workflow generation: filter out empty calib workflows
1 parent 5b9960a commit e9d964f

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

DATA/tools/parse

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,12 @@ for line in f:
103103
filename = tmpdir + '/wf' + str(i) + '.dds'
104104
if args[i].startswith('reco'):
105105
wf = args[i].split(',', 3)
106-
recoworkflows.append(filename)
107106
is_calib_workflow = 0
108107
elif args[i].startswith('calib'):
109108
wf = args[i].split(',', 2)
110-
filenamecore = filename
111-
# filenamecore = filenamecore+ ':' + wf[1] # Currently disabled, since odc-epn-topo does not accept :[ncores]
112109
wf.append(wf[2])
113110
wf[1] = '1';
114111
wf[2] = wf[1]
115-
calibworkflows.append(filenamecore)
116112
is_calib_workflow = 1
117113
else:
118114
print('Invalid workflow type', args[i])
@@ -136,6 +132,21 @@ for line in f:
136132
break
137133
print(line)
138134
raise
135+
if args[i].startswith('reco'):
136+
recoworkflows.append(filename)
137+
elif args[i].startswith('calib'):
138+
if os.environ['WORKFLOWMODE'] == 'dds':
139+
isempty = 1
140+
ftmp = open(filename, 'r')
141+
rg = re.compile('^.*<decltask')
142+
for line in ftmp:
143+
if re.match(rg, line):
144+
isempty = 0
145+
break
146+
if isempty:
147+
continue
148+
# filename = filename+ ':' + wf[1] # Currently disabled, since odc-epn-topo does not accept :[ncores]
149+
calibworkflows.append(filename)
139150
if reco_num_nodes_override > 0:
140151
reconodes = reco_num_nodes_override
141152
reconodesmin = min(reconodes, reconodesmin)

0 commit comments

Comments
 (0)