From a796279e8f86b888b9e520244b53bcd911d60998 Mon Sep 17 00:00:00 2001 From: Derek Weitzel Date: Fri, 25 Mar 2022 22:06:17 -0500 Subject: [PATCH] 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) --- config/01-ce-router-defaults.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/01-ce-router-defaults.conf b/config/01-ce-router-defaults.conf index 2ca1070f2..bd19fd73f 100644 --- a/config/01-ce-router-defaults.conf +++ b/config/01-ce-router-defaults.conf @@ -175,7 +175,7 @@ JOB_ROUTER_TRANSFORM_Cpus @=jrt SET JobIsRunning (JobStatus =!= 1) && (JobStatus =!= 5) if $(test_want_whole_node) - SET JOB_GLIDEIN_Cpus "$$([TotalCpus ?: JobCpus])" + SET JOB_GLIDEIN_Cpus "$$([int(TotalCpus ?: JobCpus)])" # MATCH_EXP_JOB_GLIDEIN_Cpus is based on the value of JOB_GLIDEIN_Cpus once the routed job is matched to an # HTCondor slot SET GlideinCpusIsGood int(MATCH_EXP_JOB_GLIDEIN_Cpus ?: "0") isnt error @@ -196,7 +196,7 @@ JOB_ROUTER_TRANSFORM_Gpus @=jrt # GPUs on that machine REQUIREMENTS RequestGpus isnt undefined if $(test_want_whole_node) - SET JOB_GLIDEIN_GPUs "$$([TotalGPUs ?: JobGPUs])" + SET JOB_GLIDEIN_GPUs "$$([int(TotalGPUs ?: JobGPUs)])" # MATCH_EXP_JOB_GLIDEIN_GPUs is based on the value of JOB_GLIDEIN_GPUs once the routed job is matched to an # HTCondor slot SET GlideinGPUsIsGood int(MATCH_EXP_JOB_GLIDEIN_GPUs ?: "0") isnt error