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

This topic: CLIC > Detector > CLICSoftwareComputing > Software > DiracUsage > DiracForUsers > IlcdiracFirstJob
Topic revision: r4 - 2016-08-03 - AndreSailer
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 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