Implement an imperfect cpu_eff correction for nomultithread

This commit is contained in:
2026-07-15 16:18:43 +02:00
parent 0b6a98f2e6
commit 7a6188978a
+7
View File
@@ -937,6 +937,13 @@ def build_job_records(rows: list[dict[str, str]]) -> list[JobRecord]:
# related to 2 hyperthreads, and cputime_raw should have been doubled
# for these cases
cpu_eff = pct(totalcpu, cputime_raw)
# We correct for cases where users specify nomultithread, and where
# only 1 in 2 CPUs is used. WARNING: This is not perfect!!! Also, we
# store this in the cache, so not recalculated from original values
# when reading back from cache!
if cpu_eff and req_ntasks == alloc_cpus / 2 and cpu_eff <=50:
cpu_eff = 2 * cpu_eff
time_eff = pct(elapsed, timelimit_seconds)
# Old metric: