Your first DIRAC job

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

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

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" )

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:

-- 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