first fix to be able and handle CANCELED jobs which lack some values
This commit is contained in:
+8
-1
@@ -616,7 +616,10 @@ def build_job_records(rows: list[dict[str, str]],
|
||||
# *.interactive or *.0 steps
|
||||
used_tres = [UsedTresStruct.from_tres_string(r.get("TRESUsageInTot","")) \
|
||||
for r in rss_source_rows]
|
||||
mem_used_tres = max(r.mem for r in used_tres if r.mem is not None)
|
||||
tmp_used_tres_mem = [r.mem for r in used_tres if r.mem is not None]
|
||||
if len(tmp_used_tres_mem) == 0:
|
||||
continue
|
||||
mem_used_tres = max(tmp_used_tres_mem)
|
||||
mem_used_tres_gb = None
|
||||
if mem_used_tres is not None:
|
||||
mem_used_tres_gb = mem_used_tres / (1024**3)
|
||||
@@ -627,6 +630,10 @@ def build_job_records(rows: list[dict[str, str]],
|
||||
req_ntasks = req_tres.cpu
|
||||
|
||||
alloc_cpus = int(float(top.get("AllocCPUS") or 0))
|
||||
# If no CPU was ever allocated, this is a job that never was
|
||||
# scheduled to run. We exclude it
|
||||
if alloc_cpus == 0:
|
||||
continue
|
||||
nodes = int(float(top.get("NNodes") or 0))
|
||||
elapsed = int(float(top.get("ElapsedRaw") or 0))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user