Your first DIRAC job

Create a dirac proxy by running dirac-proxy-init and copy the following script into a file, submit.py. and then run python submit.py to submit the job.

#!/bin/env python
from DIRAC.Core.Base import Script
Script.parseCommandLine()

from ILCDIRAC.Interfaces.API.DiracILC import DiracILC
from ILCDIRAC.Interfaces.API.NewInterface.UserJob import UserJob
from ILCDIRAC.Interfaces.API.NewInterface.Applications import Marlin

dIlc = DiracILC()

job = UserJob()
job.setOutputSandbox(["*.log", "*.sh", "*.py"])
job.setJobGroup( "myScript" )
job.setName( "myScript_1" )
job.setExecutable( "hostname" )
job.submit(dIlc)

This will submit a job to the system and run the "hostname" command on the workernode, which just prints the name of the machine your job ran on. More complete and useful examples can be found here: http://lcd-data.web.cern.ch/lcd-data/doc/ilcdiracdoc/DOC/Examples/ExampleJobs.html

-- AndreSailer - 2016-08-03

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2016-08-03 - AndreSailer
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CLIC All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback