Skip to content

Commit a8c093a

Browse files
committed
fix(resources): submit options should go in the sub file for Condor
1 parent b3d83ba commit a8c093a

File tree

1 file changed

+27
-2
lines changed
  • src/DIRAC/Resources/Computing/BatchSystems

1 file changed

+27
-2
lines changed

src/DIRAC/Resources/Computing/BatchSystems/Condor.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ def submitJob(self, **kwargs):
157157
holdReasonSubcode=HOLD_REASON_SUBCODE,
158158
daysToKeepRemoteLogs=1,
159159
scheddOptions="",
160-
extraString="",
160+
extraString=submitOptions,
161161
pilotStampList=",".join(stamps),
162162
)
163163
)
164164

165165
jdlFile.flush()
166166

167167
cmd = "%s; " % preamble if preamble else ""
168-
cmd += "condor_submit %s %s" % (submitOptions, jdlFile.name)
168+
cmd += "condor_submit %s" % jdlFile.name
169169
sp = subprocess.Popen(
170170
cmd,
171171
shell=True,
@@ -379,3 +379,28 @@ def getCEStatus(self, **kwargs):
379379
resultDict["Waiting"] += 1
380380

381381
return resultDict
382+
383+
def getJobOutputFiles(self, **kwargs):
384+
"""Get output file names and templates for the specific CE"""
385+
resultDict = {}
386+
387+
MANDATORY_PARAMETERS = ["JobIDList", "OutputDir", "ErrorDir"]
388+
for argument in MANDATORY_PARAMETERS:
389+
if argument not in kwargs:
390+
resultDict["Status"] = -1
391+
resultDict["Message"] = "No %s" % argument
392+
return resultDict
393+
394+
outputDir = kwargs["OutputDir"]
395+
errorDir = kwargs["ErrorDir"]
396+
jobIDList = kwargs["JobIDList"]
397+
398+
jobDict = {}
399+
for jobID in jobIDList:
400+
jobDict[jobID] = {}
401+
jobDict[jobID]["Output"] = "%s/%s.out" % (outputDir, jobID)
402+
jobDict[jobID]["Error"] = "%s/%s.err" % (errorDir, jobID)
403+
404+
resultDict["Status"] = 0
405+
resultDict["Jobs"] = jobDict
406+
return resultDict

0 commit comments

Comments
 (0)