Skip to content

Commit 24d38b8

Browse files
committed
fix: RAM is not anymore a Tag
1 parent 4eaa121 commit 24d38b8

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/DIRAC/WorkloadManagementSystem/Client/JobState/JobState.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
""" This object is a wrapper for setting and getting jobs states
2-
"""
1+
"""This object is a wrapper for setting and getting jobs states"""
2+
33
from DIRAC import S_ERROR, S_OK, gLogger
44
from DIRAC.WorkloadManagementSystem.Client import JobStatus
55
from DIRAC.WorkloadManagementSystem.Client.JobState.JobManifest import JobManifest
66
from DIRAC.WorkloadManagementSystem.DB.JobDB import JobDB
77
from DIRAC.WorkloadManagementSystem.DB.JobLoggingDB import JobLoggingDB
8-
from DIRAC.WorkloadManagementSystem.DB.TaskQueueDB import TaskQueueDB, multiValueDefFields, singleValueDefFields
8+
from DIRAC.WorkloadManagementSystem.DB.TaskQueueDB import (
9+
TaskQueueDB,
10+
multiValueDefFields,
11+
singleValueDefFields,
12+
rangeValueDefFields,
13+
)
914
from DIRAC.WorkloadManagementSystem.Service.JobPolicy import (
1015
RIGHT_CHANGE_STATUS,
1116
RIGHT_GET_INFO,
@@ -351,6 +356,10 @@ def insertIntoTQ(self, manifest=None):
351356
if name in reqCfg:
352357
jobReqDict[name] = reqCfg.getOption(name, [])
353358

359+
for name in rangeValueDefFields:
360+
if name in reqCfg:
361+
jobReqDict[name] = reqCfg[name]
362+
354363
jobPriority = reqCfg.getOption("UserPriority", 1)
355364

356365
result = self.__retryFunction(2, JobState.__db.tqDB.insertJob, (self.__jid, jobReqDict, jobPriority))

src/DIRAC/WorkloadManagementSystem/Executor/JobScheduling.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def optimizeJob(self, jid, jobState):
249249

250250
# Get stageSites[0] because it has already been randomized and it's as good as any in stageSites
251251
stageSite = stageSites[0]
252-
self.jobLog.verbose(" Staging site will be", stageSite)
252+
self.jobLog.verbose("Staging site will be", stageSite)
253253
stageData = idSites[stageSite]
254254
# Set as if everything has already been staged
255255
stageData["disk"] += stageData["tape"]
@@ -351,12 +351,6 @@ def _getTagsFromManifest(self, jobManifest):
351351
tagList.append("WholeNode")
352352
tagList.append("MultiProcessor")
353353

354-
# sorting out the RAM (this should be probably coded ~same as number of processors)
355-
if "MaxRAM" in jobManifest:
356-
maxRAM = jobManifest.getOption("MaxRAM", 0)
357-
if maxRAM:
358-
tagList.append(f"{maxRAM}MB")
359-
360354
# other tags? Just add them
361355
if "Tags" in jobManifest:
362356
tagList.extend(jobManifest.getOption("Tags", []))

0 commit comments

Comments
 (0)