Ejemplo n.º 1
0
  helloJMP.setInputSandbox([find_all('exe-script.py', rootPath, '/DIRAC/tests/Workflow/')[0]])
except IndexError:
  helloJMP.setInputSandbox([find_all('exe-script.py', os.environ['WORKSPACE'], '/DIRAC/tests/Workflow/')[0]])
helloJMP.setExecutable("exe-script.py", "", "helloWorld.log")
helloJMP.setCPUTime(17800)
helloJMP.setDestination('DIRAC.Jenkins.ch')
helloJMP.setTag('MultiProcessor')  # this should make the difference!
result = dirac.submitJob(helloJMP)
gLogger.info("Hello world job MP: ", result)
if not result['OK']:
  gLogger.error("Problem submitting job", result['Message'])
  exit(1)


# Simple GaudiApplication job to DIRAC.Jenkins.ch
gLogger.info("\n Submitting gaudi application job targeting DIRAC.Jenkins.ch")
gaudiJ = LHCbJob()
gaudiJ.setName("GaudiJob-TO-Jenkins")
gaudiJ.setApplication('Gauss', 'v49r5', '$APPCONFIGOPTS/Gauss/DataType-2012.py',
                      extraPackages='AppConfig.v3r277;Gen/DecFiles.v29r10',
                      events=1)
gaudiJ.setCPUTime(17800)
gaudiJ.setDestination('DIRAC.Jenkins.ch')
result = dirac.submitJob(gaudiJ)
gLogger.info("Gaudi job: ", result)
if not result['OK']:
  gLogger.error("Problem submitting job", result['Message'])
  exit(1)

gLogger.info("\nALL JOBS SUBMITTED CORRECTLY\n")
Ejemplo n.º 2
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
Ejemplo n.º 3
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.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"
)