From e236d420cdd48c8b7143e2af22db6e7d99981800 Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Mon, 3 Apr 2023 14:29:00 +0300 Subject: [PATCH 1/2] Update PBS Memory Conversion Changed from 1E6 -> 1E8 --- arc/job/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc/job/adapter.py b/arc/job/adapter.py index d91b4678e8..f5391cc8bb 100644 --- a/arc/job/adapter.py +++ b/arc/job/adapter.py @@ -764,7 +764,7 @@ def set_cpu_and_mem(self): self.submit_script_memory = math.ceil(total_submit_script_memory) # in MB if cluster_software in ['pbs']: # In PBS, "#PBS -l select=1:ncpus=8:mem=12000000" specifies the memory for all cores to be 12 MB. - self.submit_script_memory = math.ceil(total_submit_script_memory) * 1E6 # in Bytes + self.submit_script_memory = math.ceil(total_submit_script_memory) * 1E8 # in Bytes elif cluster_software in ['slurm']: # In Slurm, "#SBATCH --mem-per-cpu=2000" specifies the memory **per cpu/thread** to be 2000 MB. self.submit_script_memory = math.ceil(total_submit_script_memory / self.cpu_cores) # in MB From 35e7ec62c6981c2498c557c2213aa018c6731dff Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Mon, 3 Apr 2023 14:31:52 +0300 Subject: [PATCH 2/2] Updated PBS Memory Test Changed the conversion in the test to accurately reflect the changes in the adapter.py --- arc/job/adapter_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc/job/adapter_test.py b/arc/job/adapter_test.py index 782c1f2950..a55c6fd885 100644 --- a/arc/job/adapter_test.py +++ b/arc/job/adapter_test.py @@ -334,7 +334,7 @@ def test_set_cpu_and_mem(self): self.job_4.server = 'server3' self.job_4.cpu_cores = None self.job_4.set_cpu_and_mem() - expected_memory = math.ceil(14 * 1024 * 1.1) * 1E6 + expected_memory = math.ceil(14 * 1024 * 1.1) * 1E8 self.assertEqual(self.job_4.submit_script_memory, expected_memory) self.job_4.server = 'local'