Skip to content

Commit 14e182e

Browse files
committed
fix: do not divide maxRAM
1 parent 7aa10f5 commit 14e182e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/DIRAC/WorkloadManagementSystem/Client/DownloadInputData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def __checkDiskSpace(self, totalSize):
227227
diskSpace = getDiskSpace(self.__getDownloadDir(False)) # MB
228228
availableBytes = diskSpace * 1024 * 1024 # bytes
229229
bufferGBs = gConfig.getValue(
230-
os.path.join("/Systems/WorkloadManagement/JobWrapper", "JobWrapper", "MinOutputDataBufferGB"), 5.0
230+
os.path.join("/Systems/WorkloadManagement/JobWrapper", "MinOutputDataBufferGB"), 5.0
231231
)
232232
data = bufferGBs * 1024 * 1024 * 1024 # bufferGBs in bytes
233233
if (data + totalSize) < availableBytes:

src/DIRAC/WorkloadManagementSystem/Client/Matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _processResourceDescription(self, resourceDescription):
196196
maxRAM = resourceDescription.get("MaxRAM")
197197
if maxRAM:
198198
try:
199-
maxRAM = int(maxRAM / 1000)
199+
maxRAM = int(maxRAM)
200200
except ValueError:
201201
maxRAM = None
202202
nProcessors = resourceDescription.get("NumberOfProcessors")

src/DIRAC/WorkloadManagementSystem/Executor/test/Test_Executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def test__applySiteFilter(sites, banned, expected):
5555
({"Tag": "bof"}, ["bof"]),
5656
({"Tags": "bof, bif"}, ["bof", "bif"]),
5757
({"MaxRAM": 2500}, ["2500MB"]),
58-
({"Tags": "bof, bif", "MaxRAM": 2048}, ["bof", "bif", "2500MB"]),
59-
({"WholeNode": "yes", "MaxRAM": 2048}, ["WholeNode", "MultiProcessor", "2500MB"]),
58+
({"Tags": "bof, bif", "MaxRAM": 2048}, ["bof", "bif", "2048MB"]),
59+
({"WholeNode": "yes", "MaxRAM": 2048}, ["WholeNode", "MultiProcessor", "2048MB"]),
6060
({"NumberOfProcessors": 1}, []),
6161
({"NumberOfProcessors": 4}, ["MultiProcessor", "4Processors"]),
6262
({"NumberOfProcessors": 4, "MinNumberOfProcessors": 2}, ["MultiProcessor", "4Processors"]),

tests/Jenkins/dirac-cfg-update-server.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env python
2-
""" update local cfg
3-
"""
2+
"""update local cfg"""
3+
44
import os
55
import sys
66

77
from DIRAC.Core.Base.Script import Script
88

9-
Script.setUsageMessage("\n".join([__doc__.split("\n")[1], "Usage:", f" {Script.scriptName} [options] ... DB ..."]))
9+
Script.setUsageMessage("\n".join([__doc__.split("\n")[0], "Usage:", f" {Script.scriptName} [options] ... DB ..."]))
1010

1111
Script.parseCommandLine()
1212

@@ -553,8 +553,8 @@
553553
# to avoid having to wait while testing rescheduling
554554
csAPI.setOption("Systems/WorkloadManagement/Executors/Optimizers/JobScheduling/RescheduleDelays", "0")
555555

556-
csAPI.createSection("Systems/WorkloadManagement/Production/JobWrapper/")
557-
csAPI.setOption("Systems/WorkloadManagement/Production/JobWrapper/MinOutputDataBufferGB", 1)
556+
csAPI.createSection("Systems/WorkloadManagement/JobWrapper/")
557+
csAPI.setOption("Systems/WorkloadManagement/JobWrapper/MinOutputDataBufferGB", 1)
558558

559559
# Final action: commit in CS
560560
res = csAPI.commit()

0 commit comments

Comments
 (0)