From 21e98f9f81e325e09a70c4d0ceb69f00594d9880 Mon Sep 17 00:00:00 2001 From: Alexx Perloff Date: Wed, 20 May 2020 23:22:21 -0500 Subject: [PATCH] Automatically detect the host OS for the submission scripts. --- python/jobSubmitter.py | 1 + scripts/jobExecCondor.jdl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python/jobSubmitter.py b/python/jobSubmitter.py index 2d665f4..d84e61a 100755 --- a/python/jobSubmitter.py +++ b/python/jobSubmitter.py @@ -282,6 +282,7 @@ def generateStep1(self,job): def generateExtra(self,job): job.patterns.update([ + ("OSVERSION","rhel7" if "el7" in os.uname()[2] else "rhel6"), ("MYDISK",self.disk), ("MYMEMORY",self.memory), ("MYCPUS",self.cpus), diff --git a/scripts/jobExecCondor.jdl b/scripts/jobExecCondor.jdl index 0fd95eb..f202d34 100755 --- a/scripts/jobExecCondor.jdl +++ b/scripts/jobExecCondor.jdl @@ -1,6 +1,6 @@ universe = vanilla Executable = jobExecCondor.sh -+REQUIRED_OS = "rhel6" ++REQUIRED_OS = "OSVERSION" +DesiredOS = REQUIRED_OS request_disk = MYDISK request_memory = MYMEMORY