Skip to content

Commit c629592

Browse files
committed
Use integer conversion for Cpus and Gpus
The CPUs and GPUs are floats, for some reason. Convert to integer which makes it easier to parse with python classad bindings (for example in the gratia probe)
1 parent c4c307c commit c629592

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: config/01-ce-router-defaults.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ JOB_ROUTER_TRANSFORM_Cpus @=jrt
175175
SET JobIsRunning (JobStatus =!= 1) && (JobStatus =!= 5)
176176

177177
if $(test_want_whole_node)
178-
SET JOB_GLIDEIN_Cpus "$$([TotalCpus ?: JobCpus])"
178+
SET JOB_GLIDEIN_Cpus "$$([int(TotalCpus ?: JobCpus)])"
179179
# MATCH_EXP_JOB_GLIDEIN_Cpus is based on the value of JOB_GLIDEIN_Cpus once the routed job is matched to an
180180
# HTCondor slot
181181
SET GlideinCpusIsGood int(MATCH_EXP_JOB_GLIDEIN_Cpus ?: "0") isnt error
@@ -196,7 +196,7 @@ JOB_ROUTER_TRANSFORM_Gpus @=jrt
196196
# GPUs on that machine
197197
REQUIREMENTS RequestGpus isnt undefined
198198
if $(test_want_whole_node)
199-
SET JOB_GLIDEIN_GPUs "$$([TotalGPUs ?: JobGPUs])"
199+
SET JOB_GLIDEIN_GPUs "$$([(TotalGPUs ?: JobGPUs)])"
200200
# MATCH_EXP_JOB_GLIDEIN_GPUs is based on the value of JOB_GLIDEIN_GPUs once the routed job is matched to an
201201
# HTCondor slot
202202
SET GlideinGPUsIsGood int(MATCH_EXP_JOB_GLIDEIN_GPUs ?: "0") isnt error

0 commit comments

Comments
 (0)