コード例 #1
0
ファイル: runTheMatrix.py プロジェクト: aladinggit/cmssw
def runSelected(opt):

    mrd = MatrixReader(opt)
    mrd.prepare(opt.useInput, opt.refRel, opt.fromScratch)

    # test for wrong input workflows
    if opt.testList:
        definedSet = set([dwf.numId for dwf in mrd.workFlows])
        testSet = set(opt.testList)
        undefSet = testSet - definedSet
        if len(undefSet) > 0:
            raise ValueError('Undefined workflows: ' +
                             ', '.join(map(str, list(undefSet))))

    ret = 0
    if opt.show:
        mrd.show(opt.testList, opt.extended, opt.cafVeto)
        if opt.testList: print('testListected items:', opt.testList)
    else:
        mRunnerHi = MatrixRunner(mrd.workFlows, opt.nProcs, opt.nThreads)
        ret = mRunnerHi.runTests(opt)

    if opt.wmcontrol:
        if ret != 0:
            print('Cannot go on with wmagent injection with failing workflows')
        else:
            wfInjector = MatrixInjector(opt,
                                        mode=opt.wmcontrol,
                                        options=opt.wmoptions)
            ret = wfInjector.prepare(mrd, mRunnerHi.runDirs)
            if ret == 0:
                wfInjector.upload()
                wfInjector.submit()
    return ret
コード例 #2
0
ファイル: runTheMatrix.py プロジェクト: nikhilghanathe/cmssw
def runSelected(opt):

    mrd = MatrixReader(opt)
    mrd.prepare(opt.useInput, opt.refRel, opt.fromScratch)

    ret = 0
    if opt.show:
        mrd.show(opt.testList, opt.extended, opt.cafVeto)
        if opt.testList: print 'testListected items:', opt.testList
    else:
        mRunnerHi = MatrixRunner(mrd.workFlows, opt.nProcs, opt.nThreads)
        ret = mRunnerHi.runTests(opt)

    if opt.wmcontrol:
        if ret != 0:
            print 'Cannot go on with wmagent injection with failing workflows'
        else:
            wfInjector = MatrixInjector(opt,
                                        mode=opt.wmcontrol,
                                        options=opt.wmoptions)
            ret = wfInjector.prepare(mrd, mRunnerHi.runDirs)
            if ret == 0:
                wfInjector.upload()
                wfInjector.submit()
    return ret
コード例 #3
0
ファイル: runTheMatrix.py プロジェクト: steggema/cmssw
def runSelected(opt):

    mrd = MatrixReader(opt)
    mrd.prepare(opt.useInput, opt.refRel, opt.fromScratch)

    # test for wrong input workflows
    if opt.testList:
        definedWF = []
        for dwf in mrd.workFlows:
            definedWF.append(dwf.numId)
        for twf in opt.testList:
            if twf not in definedWF:
                raise ValueError('Not defined workflow ', twf, ' requested')

    ret = 0
    if opt.show:
        mrd.show(opt.testList, opt.extended, opt.cafVeto)
        if opt.testList: print('testListected items:', opt.testList)
    else:
        mRunnerHi = MatrixRunner(mrd.workFlows, opt.nProcs, opt.nThreads)
        ret = mRunnerHi.runTests(opt)

    if opt.wmcontrol:
        if ret != 0:
            print('Cannot go on with wmagent injection with failing workflows')
        else:
            wfInjector = MatrixInjector(opt,
                                        mode=opt.wmcontrol,
                                        options=opt.wmoptions)
            ret = wfInjector.prepare(mrd, mRunnerHi.runDirs)
            if ret == 0:
                wfInjector.upload()
                wfInjector.submit()
    return ret
コード例 #4
0
ファイル: runTheMatrix.py プロジェクト: ZihengChen/cmssw
def runSelected(opt):

    mrd = MatrixReader(opt)
    mrd.prepare(opt.useInput, opt.refRel, opt.fromScratch)

    ret = 0
    if opt.show:
        mrd.show(opt.testList, opt.extended, opt.cafVeto)
        if opt.testList : print('testListected items:', opt.testList)
    else:
        mRunnerHi = MatrixRunner(mrd.workFlows, opt.nProcs, opt.nThreads)
        ret = mRunnerHi.runTests(opt)

    if opt.wmcontrol:
        if ret!=0:
            print('Cannot go on with wmagent injection with failing workflows')
        else:
            wfInjector = MatrixInjector(opt,mode=opt.wmcontrol,options=opt.wmoptions)
            ret= wfInjector.prepare(mrd,
                                    mRunnerHi.runDirs)
            if ret==0:
                wfInjector.upload()
                wfInjector.submit()
    return ret
コード例 #5
0
ファイル: runPerfMatrix.py プロジェクト: cms-sw/int-build
  for wf in mrd.workFlows:
    if str(wf.numId) not in testList: continue
    print "processing ", wf.numId

    if newWorkFlows: updateNewWF(wf)
    else: updateOldWF(wf)

  ret = 0
  if show:
    if not newWorkFlows:
      for i in range(0,len(testList)): testList[i] = float(testList[i])
    mrd.show(testList)
    print 'selected items:', testList
  else:
    print 'going to run', testList
    mRunner = MatrixRunner(mrd.workFlows, nThreads)
    try:
      ret = mRunner.runTests(testList)
    except:
      opts.testList = testList
      ret = mRunner.runTests(opts)    

  return ret

# --------------------------------------------------------------------------------



# ================================================================================

if __name__ == '__main__':
コード例 #6
0
ファイル: runPerfMatrix.py プロジェクト: davidlt/int-build
        if str(wf.numId) not in testList: continue
        print "processing ", wf.numId

        if newWorkFlows: updateNewWF(wf)
        else: updateOldWF(wf)

    ret = 0
    if show:
        if not newWorkFlows:
            for i in range(0, len(testList)):
                testList[i] = float(testList[i])
        mrd.show(testList)
        print 'selected items:', testList
    else:
        print 'going to run', testList
        mRunner = MatrixRunner(mrd.workFlows, nThreads)
        try:
            ret = mRunner.runTests(testList)
        except:
            opts.testList = testList
            ret = mRunner.runTests(opts)

    return ret


# --------------------------------------------------------------------------------

# ================================================================================

if __name__ == '__main__':