diff --git a/analysis/tasks/FastProd.py b/analysis/tasks/FastProd.py index 8e157b8c44923eb215b58076464a5f103e8d7774..fd8bd1722dece753330810fb57d7860f214625f6 100644 --- a/analysis/tasks/FastProd.py +++ b/analysis/tasks/FastProd.py @@ -167,6 +167,12 @@ class FastProd(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow ) f.write(runcard) + # KR: With hyperthreading it might be necessary to request more cpus on a node than one wants to use for the calculation! + # --> Differentiate between request and use CPUs! + # os.environ['OMP_NUM_THREADS'] = self.htcondor_request_cpus + logger.debug("Setting no. of threads to use: self.htcondor_use_cpus[index] = {}".format(self.htcondor_use_cpus[self.branch_data['index']])) + os.environ['OMP_NUM_THREADS'] = self.htcondor_use_cpus[self.branch_data['index']] + logger.debug("Starting NNLOJET with runcard: %s", runfile) command_line_args = ['NNLOJET', '-run', runfile] diff --git a/analysis/tasks/FastWarm.py b/analysis/tasks/FastWarm.py index 08ef537faf26755d7564195a92344c1e859f1b97..2fdc27592fd2a919852a90399c2418db59011337 100644 --- a/analysis/tasks/FastWarm.py +++ b/analysis/tasks/FastWarm.py @@ -157,6 +157,12 @@ class FastWarm(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow ) f.write(runcard) + # KR: With hyperthreading it might be necessary to request more cpus on a node than one wants to use for the calculation! + # --> Differentiate between request and use CPUs! + # os.environ['OMP_NUM_THREADS'] = self.htcondor_request_cpus + logger.debug("Setting no. of threads to use: self.htcondor_use_cpus[index] = {}".format(self.htcondor_use_cpus[self.branch_data['index']])) + os.environ['OMP_NUM_THREADS'] = self.htcondor_use_cpus[self.branch_data['index']] + logger.debug("Starting NNLOJET with runcard: %s", runfile) command_line_args = ['NNLOJET', '-run', runfile]