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