ATLAS Offline Software
Classes | Functions | Variables
sherpaTarCreator.htcondor_naf Namespace Reference

Classes

class  batchJob
 

Functions

def finalizeJobs (dryRun)
 

Variables

list joblist = []
 
dictionary dependencelist = {}
 

Function Documentation

◆ finalizeJobs()

def sherpaTarCreator.htcondor_naf.finalizeJobs (   dryRun)

Definition at line 38 of file htcondor_naf.py.

38 def finalizeJobs(dryRun):
39 
40  #create dagfile
41  dagfile = ""
42  for job in joblist:
43  dagfile += "JOB "+job.id+" "+job.basedir+"/"+job.name+".sub\n"
44 
45  for parent,children in dependencelist.items():
46  dagfile += "PARENT "+parent+" CHILD"
47  for child in children:
48  dagfile += " "+child
49  dagfile += "\n"
50 
51  #save file
52  with open("dagfile.dag", 'w') as f:
53  f.write(dagfile)
54 
55  #submit job
56  batchname = os.path.basename(os.path.normpath(os.getcwd()))
57  cmd = "condor_submit_dag -force -batch-name "+batchname+" dagfile.dag"
58 
59  if dryRun:
60  print (cmd+"\n")
61  print ("dagfile: \n"+dagfile)
62  else:
63  print (cmd)
64  p = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
65  retcode = p.communicate()
66  if len(retcode[0]):
67  print (retcode[0])
68  if len(retcode[1]):
69  print (retcode[1])
70  if p.returncode:
71  print ("ERROR: error while submitting job")
72  print ("return code: " + str(p.returncode))
73  sys.exit(11)
74 

Variable Documentation

◆ dependencelist

dictionary sherpaTarCreator.htcondor_naf.dependencelist = {}

Definition at line 6 of file htcondor_naf.py.

◆ joblist

list sherpaTarCreator.htcondor_naf.joblist = []

Definition at line 5 of file htcondor_naf.py.

sherpaTarCreator.htcondor_naf.finalizeJobs
def finalizeJobs(dryRun)
Definition: htcondor_naf.py:38
Trk::open
@ open
Definition: BinningType.h:40
str
Definition: BTagTrackIpAccessor.cxx:11