ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/jobSitter.py
(Generate patch)

Comparing UserCode/MitProd/Processing/bin/jobSitter.py (file contents):
Revision 1.3 by paus, Fri Jul 30 18:41:11 2010 UTC vs.
Revision 1.7 by paus, Tue Mar 22 02:48:51 2011 UTC

# Line 197 | Line 197 | for line in os.popen(cmd).readlines():
197  
198   # Process the crab tasks determined to be relevant in the last query
199   print '\n=============================================================================='
200 < print ' Process crab task list (please wait, crab commands are first fully parsed)\n'
200 > print ' Process crab task list\n'
201   i = 0
202   for crabTask in crabTasks:
203  
204 +    print '\n------------------------------------------------------------------------------'
205 +    print '  --> PREPPING ' + crabTask.tag \
206 +          + '\n       -> ' + crabTask.mitDataset
207 +    print '------------------------------------------------------------------------------\n'
208 +
209      dataset     = crabTask.cmsDataset
210      storageEle  = crabTask.storageEle
211      storagePath = crabTask.storagePath
# Line 236 | Line 241 | for crabTask in crabTasks:
241      if catalog == 7:
242              cmd = 'catalog.sh -g -m ' + crabTask.mitCfg + ' ' + crabTask.mitVersion + \
243                     ' ' + crabTask.mitDataset + '/' + crabTask.tag + ' --compact'
244 <    print ' CATALOG: ' + cmd
244 >
245 >
246 >    print '\n------------------------------------------------------------------------------'
247 >    print '  --> CATALOG ' + crabTask.tag \
248 >          + '\n       -> ' + dataset   + '  (' + crabTask.mitDataset + ')'\
249 >          + '\n       -> ' + storageEle \
250 >          + '\n       -> ' + storagePath
251 >    print '------------------------------------------------------------------------------\n'
252 >    #print '  --> ' + cmd
253 >
254      if catalog != 0:
255              os.system(cmd)
256  
# Line 246 | Line 260 | for crabTask in crabTasks:
260  
261      # do we need to extend the task
262      if extend == 1:
263 +        cmd = 'crab -extend -c ' + crabTask.tag
264          print '\n------------------------------------------------------------------------------'
265 <        print '  --> EXTEND ' + crabTask.tag + ' -- wait crab commands first fully parsed -- ' \
265 >        print '  --> EXTEND ' + crabTask.tag + ' -- ' \
266                + '\n       -> ' + dataset   + '  (' + crabTask.mitDataset + ')'\
267                + '\n       -> ' + storageEle \
268                + '\n       -> ' + storagePath
269          print '------------------------------------------------------------------------------\n'
270 <        cmd = 'crab -extend -c ' + crabTask.tag
270 >        print '  --> ' + cmd
271          os.system(cmd)
272  
273      print '\n------------------------------------------------------------------------------'
274 <    print '  --> STATUS ' + crabTask.tag + ' -- wait crab commands first fully parsed -- ' \
274 >    print '  --> STATUS ' + crabTask.tag + ' -- ' \
275            + '\n       -> ' + dataset   + '  (' + crabTask.mitDataset + ')'\
276            + '\n       -> ' + storageEle \
277            + '\n       -> ' + storagePath
# Line 273 | Line 288 | for crabTask in crabTasks:
288          print ' Task status: ' + crabTask.status
289          if crabTask.status == 'completed' or crabTask.status == 'finished':
290              crabTask.remove(clean)
291 +            print ' INFO - crab task has been removed, continuing.\n'
292 +            continue
293          print ' '
294  
295      # review failing sites
# Line 303 | Line 320 | for crabTask in crabTasks:
320                  subList += '%d'%(status.index)
321              else:
322                  subList += ',%d'%(status.index)
323 <        if ((status.tag == 'Aborted'  or status.exitCode > 0 or status.exitStatus > 0) or
324 <            (status.tag == 'Retrieved' and status.outputFile == 0)):
323 >        if ((status.tag == 'Aborted'  or status.exitCode > 0 or status.exitStatus > 0)):
324 >        ##or(status.tag == 'Retrieved' and status.outputFile == 0)):
325              status.showCompact()
326              if resubList == '':
327                  resubList += '%d'%(status.index)
# Line 318 | Line 335 | for crabTask in crabTasks:
335          if not re.search('-',subList) and not re.search(',',subList):
336              subList = subList + ',999999999'
337          cmd = 'crab -c ' + crabTask.tag + ' -submit ' + subList
338 <        print '\nACTION -- SUBMIT.PY: ' + cmd
339 <        if exe == 1:
340 <            status = os.system(cmd)
338 >        ##print '\nACTION -- SUBMIT.PY: ' + cmd
339 >        ##if exe == 1:
340 >        ##    status = os.system(cmd)
341      if resubList != '':
342          cmd = 'crab -c ' + crabTask.tag + ' -resubmit ' + resubList
343 <        print '\nACTION -- RE-SUBMIT.PY: ' + cmd
344 <        if exe == 1:
345 <            status = os.system(cmd)
343 >        ##print '\nACTION -- RE-SUBMIT.PY: ' + cmd
344 >        ##if exe == 1:
345 >        ##    status = os.system(cmd)
346  
347  
348 +    cmd = 'crab -getoutput -continue ' + crabTask.tag
349      print '\n------------------------------------------------------------------------------'
350 <    print '  --> GETOUTPUT ' + crabTask.tag + ' -- wait crab commands first fully parsed -- ' \
350 >    print '  --> GETOUTPUT ' + crabTask.tag + ' -- ' \
351            + '\n       -> ' + dataset \
352            + '\n       -> ' + storageEle \
353            + '\n       -> ' + storagePath
354      print '------------------------------------------------------------------------------\n'
355 <
338 <    cmd = 'crab -getoutput -continue ' + crabTask.tag
355 >    print '  --> ' + cmd
356      status = os.system(cmd)
357  
358      cmd = 'cleanupLog.py --crabId ' + crabTask.tag

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines