Beispiel #1
0
            json_data = json.load(json_file)
        except:
            print "Error reading RelVal Times"
            json_data = {"avg": []}
        for tm_str in sorted(json_data["avg"], key=int, reverse=True):
            tm = int(tm_str)
            if tm > max_tm: max_tm = tm
            for wf in json_data["avg"][tm_str]:
                if wf in workflows: owf.append([wf, tm])
    uwf = []
    owfs = [x[0] for x in owf]
    for wf in workflows:
        if not wf in owfs: uwf.append([wf, max_tm])
    workflows = uwf + owf
if workflows:
    workflows = splitWorkflows(workflows, max_wf)
    print workflows
    on_grid = 0
    if '_DEVEL_X' in environ['CMSSW_VERSION']:
        on_grid = 2
    total = len(workflows)
    try:
        for i in range(1, total + 1):
            wf = ",".join(workflows[i - 1])
            jobid = str(i) + "of" + str(total)
            jobfile = workdir + "/ib-run-relval-" + jobid
            doCmd("echo WORKFLOWS=" + wf + " >" + jobfile)
            doCmd("echo JOBID=" + jobid + " >>" + jobfile)
            if on_grid > 0:
                doCmd("echo 'SLAVE_LABELS=(condor&&cpu-8)' >>" + jobfile)
                on_grid = on_grid - 1
Beispiel #2
0
    try: json_data = json.load(json_file)
    except:
      print("Error reading RelVal Times")
      json_data={"avg": []}
    for tm_str in sorted(json_data["avg"],key=int, reverse=True):
      tm=int(tm_str)
      if tm > max_tm : max_tm=tm
      for wf in json_data["avg"][tm_str]:
        if wf in workflows: owf.append([wf,tm])
  uwf = []
  owfs = [ x[0] for x in owf ]
  for wf in workflows:
    if not wf in owfs: uwf.append([wf,max_tm])
  workflows = uwf + owf
if workflows:
  workflows = splitWorkflows(workflows, max_wf)
  print(workflows)
  on_grid = 0
  #if '_DEVEL_X' in environ['CMSSW_VERSION']:
  #  on_grid = 2
  total = len(workflows)
  try:
    for i in range(1, total+1):
      wf=",".join(workflows[i-1])
      jobid   = str(i)+"of"+str(total)
      jobfile = workdir+"/ib-run-relval-"+jobid
      doCmd("echo WORKFLOWS="+wf+" >"+jobfile)
      doCmd("echo JOBID="+jobid+" >>"+jobfile)
      if on_grid>0:
        doCmd("echo 'SLAVE_LABELS=(condor&&cpu-8)' >>"+jobfile)
        on_grid=on_grid-1