Beispiel #1
0
def createJob(local=True):

    gaudirunJob = LHCbJob()

    gaudirunJob.setName("gaudirun-Gauss-test")
    if local:
        try:
            gaudirunJob.setInputSandbox([
                find_all('prodConf_Gauss_00012345_00067890_1.py',
                         os.environ['WORKSPACE'],
                         '/tests/System/GridTestSubmission')[0],
                find_all('wrongConfig.cfg', os.environ['WORKSPACE'],
                         '/tests/System/GridTestSubmission')[0],
                find_all('pilot.cfg',
                         os.environ['WORKSPACE'] + '/PilotInstallDIR')[0]
            ])
        except (IndexError, KeyError):
            gaudirunJob.setInputSandbox([
                find_all('prodConf_Gauss_00012345_00067890_1.py', rootPath,
                         '/tests/System/GridTestSubmission')[0],
                find_all('wrongConfig.cfg', rootPath,
                         '/tests/System/GridTestSubmission')[0],
                find_all('pilot.cfg', rootPath)[0]
            ])
    else:
        try:
            gaudirunJob.setInputSandbox([
                find_all('prodConf_Gauss_00012345_00067890_1.py',
                         os.environ['WORKSPACE'],
                         '/tests/System/GridTestSubmission')[0],
                find_all('wrongConfig.cfg', os.environ['WORKSPACE'],
                         '/tests/System/GridTestSubmission')[0]
            ])
        except (IndexError, KeyError):
            gaudirunJob.setInputSandbox([
                find_all('prodConf_Gauss_00012345_00067890_1.py', rootPath,
                         '/tests/System/GridTestSubmission')[0],
                find_all('wrongConfig.cfg', rootPath,
                         '/tests/System/GridTestSubmission')[0]
            ])

    gaudirunJob.setOutputSandbox('00012345_00067890_1.sim')

    optGauss = "$APPCONFIGOPTS/Gauss/Sim08-Beam3500GeV-md100-2011-nu2.py;"
    optDec = "$DECFILESROOT/options/34112104.py;"
    optPythia = "$LBPYTHIAROOT/options/Pythia.py;"
    optOpts = "$APPCONFIGOPTS/Gauss/G4PL_FTFP_BERT_EmNoCuts.py;"
    optCompr = "$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py;"
    optPConf = "prodConf_Gauss_00012345_00067890_1.py"
    options = optGauss + optDec + optPythia + optOpts + optCompr + optPConf

    gaudirunJob.setApplication(
        'Gauss',
        'v45r5',
        options,
        extraPackages='AppConfig.v3r171;Gen/DecFiles.v27r14p1;ProdConf.v1r9',
        systemConfig='x86_64-slc5-gcc43-opt',
        modulesNameList=[
            'CreateDataFile', 'GaudiApplication', 'FileUsage',
            'UploadOutputData', 'UploadLogFile', 'FailoverRequest',
            'UserJobFinalization'
        ],
        parametersList=[('applicationName', 'string', '', 'Application Name'),
                        ('applicationVersion', 'string', '',
                         'Application Version'),
                        ('applicationLog', 'string', '',
                         'Name of the output file of the application'),
                        ('optionsFile', 'string', '', 'Options File'),
                        ('extraOptionsLine', 'string', '',
                         'This is appended to standard options'),
                        ('inputDataType', 'string', '', 'Input Data Type'),
                        ('inputData', 'string', '', 'Input Data'),
                        ('numberOfEvents', 'string', '', 'Events treated'),
                        ('extraPackages', 'string', '', 'ExtraPackages'),
                        ('listoutput', 'list', [], 'StepOutputList'),
                        ('SystemConfig', 'string', '', 'binary tag')])

    gaudirunJob._addParameter(gaudirunJob.workflow, 'PRODUCTION_ID', 'string',
                              '00012345', 'ProductionID')
    gaudirunJob._addParameter(gaudirunJob.workflow, 'JOB_ID', 'string',
                              '00067890', 'JobID')
    gaudirunJob._addParameter(gaudirunJob.workflow, 'configName', 'string',
                              'testCfg', 'ConfigName')
    gaudirunJob._addParameter(gaudirunJob.workflow, 'configVersion', 'string',
                              'testVer', 'ConfigVersion')
    outputList = [{
        'stepName': 'GaussStep1',
        'outputDataType': 'sim',
        'outputBKType': 'SIM',
        'outputDataSE': 'Tier1_MC-DST',
        'outputDataName': '00012345_00067890_1.sim'
    }]
    gaudirunJob._addParameter(gaudirunJob.workflow, 'outputList', 'list',
                              outputList, 'outputList')
    gaudirunJob._addParameter(gaudirunJob.workflow, 'outputDataFileMask',
                              'string', '', 'outputFM')
    gaudirunJob._addParameter(gaudirunJob.workflow, 'outputMode', 'string',
                              'Local', 'OM')
    gaudirunJob._addParameter(gaudirunJob.workflow, 'LogLevel', 'string',
                              'DEBUG', 'LL')
    outputFilesDict = [{
        'outputDataName': '00012345_00067890_1.sim',
        'outputDataSE': 'Tier1_MC-DST',
        'outputDataType': 'SIM'
    }]
    gaudirunJob._addParameter(gaudirunJob.workflow.step_instances[0],
                              'listoutput', 'list', outputFilesDict,
                              'listoutput')

    gaudirunJob.setLogLevel('DEBUG')
    gaudirunJob.setDIRACPlatform()
    if local:
        gaudirunJob.setConfigArgs('pilot.cfg wrongConfig.cfg')
    else:
        gaudirunJob.setConfigArgs('wrongConfig.cfg')

    gaudirunJob.setCPUTime(172800)

    return gaudirunJob
Beispiel #2
0
optPythia = "$LBPYTHIAROOT/options/Pythia.py;"
optOpts = "$APPCONFIGOPTS/Gauss/G4PL_FTFP_BERT_EmNoCuts.py;"
optCompr = "$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py;"
optPConf = "prodConf_Gauss_00012345_00067890_1.py"
options = optGauss + optDec + optPythia + optOpts + optCompr + optPConf
# gaudirunJob.addPackage('AppConfig', 'v3r179')
# gaudirunJob.addPackage('Gen/DecFiles', 'v27r14p1')
# gaudirunJob.addPackage('ProdConf', 'v1r9')
gaudirunJob.setApplication(
    'Gauss',
    'v45r5',
    options,
    extraPackages='AppConfig.v3r179;Gen/DecFiles.v27r14p1;ProdConf.v1r9',
    systemConfig='x86_64-slc5-gcc43-opt')

gaudirunJob.setDIRACPlatform()
gaudirunJob.setCPUTime(172800)

result = dirac.submitJob(gaudirunJob)
gLogger.info('Submission Result: ', result)

########################################################################################

gLogger.info(
    "\n Submitting gaudiRun job (Gauss only) that should use TAG to run on a multi-core queue"
)

gaudirunJob = LHCbJob()

gaudirunJob.setName("gaudirun-Gauss-test-TAG-multicore")
gaudirunJob.setInputSandbox([