Skip to content

Parametric jobs with DIRAC Python API #6965

Answered by FA-VS
FA-VS asked this question in Q&A
Discussion options

You must be logged in to vote

Hi all,
I have tried to just skip DIRAC's internal management of parametric jobs, and just make a simple loop. This seems to work ok, but I am posting here in case this will introduce problems I am not aware of yet.

from DIRAC.Core.Base import Script
Script.initialize() #I want to avoid parseCommandLine()

from DIRAC.Interfaces.API.Job import Job
from DIRAC.Interfaces.API.Dirac import Dirac

joblist = [job1, job2, job3]
inputlist = [input1, input2, input3]
outputlist = [output1, output2, output3]

dirac = Dirac()
for i in range(len(joblist)):
  j=job()
  j.setInputSandbox([ joblist[i], inputlist[i] ])
  j.setOutputSandbox([ joblist[i], inputlist[i], outputlist[i] ])
  j.setExecutable(jobl…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fstagni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant