Commit 1fab9075 authored by akhuziy's avatar akhuziy
Browse files

allocated CU is now in the node class of Aggregator

parent 26d3d9a3
......@@ -57,7 +57,8 @@ class NodeData:
seq_cpu_usage = None
seq_load = None
proc = None
alloc_cu = None
def __init__(self):
self.proc = ProcData()
self.seq_load = SeqVals()
......
......@@ -54,6 +54,7 @@ def get_aggregator(job_id, type="ascii"):
new_node.virt_thr_core = noded["virt_thr_core"]
new_node.phys_thr_core = noded["phys_thr_core"]
new_node.main_mem = noded["main_mem"]
new_node.alloc_cu = cud[node_id]
procd = data["proc"][node_id]
......
......@@ -104,12 +104,7 @@ def format(agg, type="ascii"):
return formatted
def format_acsii_nonstd(agg, result):
# TODO: format alloc_cu
cus = {}
for alloc_info in agg.job.alloc_cu:
cus[alloc_info.node_id] = alloc_info.cu_count
# Custom formatters
for i, _ in enumerate(result["nodes"]):
result["nodes"][i]["num_cores"] = cus[result["nodes"][i]["node_name"]]
return result
......@@ -39,7 +39,7 @@ class OutputSchemes:
"phys_threads_per_core": "phys_thr_core",
"virt_threads_per_core": "virt_thr_core",
"available_main_mem": "main_mem",
"num_cores": None,
"num_cores": "alloc_cu",
}
}
}
......@@ -85,7 +85,7 @@ class OutputSchemes:
"phys_threads_per_core": "phys_thr_core",
"virt_threads_per_core": "virt_thr_core",
"available_main_mem": "main_mem",
"num_cores": None,
"num_cores": "alloc_cu",
"dynamic": {
"node_cpu_usage": {
"type": "seq",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment