40def finalizeJobs(dryRun):
41
42
43 dagfile = ""
44 for job in joblist:
45 dagfile += "JOB "+job.id+" "+job.basedir+"/"+job.name+".sub\n"
46
47 for parent,children in dependencelist.items():
48 dagfile += "PARENT "+parent+" CHILD"
49 for child in children:
50 dagfile += " "+child
51 dagfile += "\n"
52
53
54 with open("dagfile.dag", 'w') as f:
55 f.write(dagfile)
56
57
58 batchname = os.path.basename(os.path.normpath(os.getcwd()))
59 cmd = "condor_submit_dag -force -batch-name "+batchname+" dagfile.dag"
60
61 if dryRun:
62 print ("Submission command:", cmd+"\n")
63 print ("dagfile: \n"+dagfile)
64