Example #1
0
  gLogger.error("Problem submitting job", result['Message'])
  exit(1)


# Simple Hello Word job to DIRAC.Jenkins.ch, that needs to be matched by a MP WN
gLogger.info("\n Submitting hello world job targeting DIRAC.Jenkins.ch and a MP WN")
helloJMP = LHCbJob()
helloJMP.setName("helloWorld-TEST-TO-Jenkins-MP")
try:
  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)
Example #2
0
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;DecFiles.v27r14p1;ProdConf.v1r9',
    systemConfig='x86_64-slc5-gcc43-opt')

gaudirunJob.setDIRACPlatform()
gaudirunJob.setCPUTime(172800)
gaudirunJob.setTag(['MultiProcessor'])

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

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

gLogger.info("\n Submitting gaudiRun job (Boole only)")

gaudirunJob = LHCbJob()

gaudirunJob.setName("gaudirun-Boole-test")
gaudirunJob.setInputSandbox([
    find_all('prodConf_Boole_00012345_00067890_1.py', rootPath,
             '/tests/System/GridTestSubmission')[0]
])