aboutsummaryrefslogtreecommitdiffstats
path: root/Common/derived.py
diff options
context:
space:
mode:
Diffstat (limited to 'Common/derived.py')
-rw-r--r--Common/derived.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Common/derived.py b/Common/derived.py
index fae3da5..eb29a14 100644
--- a/Common/derived.py
+++ b/Common/derived.py
@@ -4,7 +4,8 @@ Derived Quantities.
def compute_utilization(number_of_nodes_down, \
- number_of_jobs_by_partition):
+ number_of_jobs_by_partition, \
+ number_of_allocated_cpus):
"""
Compute Cluster Utilization.
@@ -21,7 +22,7 @@ def compute_utilization(number_of_nodes_down, \
# 2 Sockets per Server, 8 Cores per Socket, 192 Servers = 3072 Cores
total_cpu_cores = 16*192
cpu_nodes_down = number_of_nodes_down['cpu']*16
- allocated_cpu_cores = number_of_jobs_by_partition['cpu']['running']
+ allocated_cpu_cores = number_of_allocated_cpus['cpu']
utilization['cpu'] = \
float(allocated_cpu_cores) / float(total_cpu_cores - cpu_nodes_down)