Skip to content

[devel] Tolerate a missing CPU normalization factor in ConfigureCPURequirements - #289

Open
fstagni wants to merge 1 commit into
DIRACGrid:develfrom
fstagni:feat/hs23-cpu-normalization
Open

fstagni wants to merge 1 commit into
DIRACGrid:develfrom
fstagni:feat/hs23-cpu-normalization

Conversation

@fstagni

@fstagni fstagni commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

New feature: tolerate a missing CPU normalization factor in ConfigureCPURequirements

Part of DIRACGrid/DIRAC#8871. Companion pilot change for DIRACGrid/DIRAC#8870.

Summary

Companion to DIRACGrid/DIRAC#8870 (CPU power from the HEPiX HS23 table). Once DB12 can be disabled (Operations/JobScheduling/RunDB12Benchmark=False), dirac-wms-cpu-normalization may no longer print the Estimated CPU power is X HS06 line, and the pilot command would crash with an unbound cpuNormalizationFactor.

 ConfigureCPURequirements.execute()
   parse "Estimated CPU power is X HS06"
-    → cpuNormalizationFactor (unbound if the line is absent)
+    → cpuNormalizationFactor or None
+  pass --CPUNormalizationFactor only when available
   dirac-wms-get-queue-cpu-time
-    jobCPUReq = seconds * factor
+    jobCPUReq = seconds * factor, or seconds (warn: no normalization available)

Parsing is also hardened: a missing CPU time left determined as line now exits with a clear error instead of raising NameError.

Evidence

  • python -m py_compile Pilot/pilotCommands.py passes.
  • Behaviour with the factor present is byte-identical to before (same command line, same jobCPUReq computation); only the previously-crashing absent-factor path changed.

Merge Danger

Door: two-way — with the DIRAC default configuration (unit DB12) the DB12 line is always printed and the code path is unchanged.

Blast Radius: pilot bootstrap only. To be merged after (or together with) DIRACGrid/DIRAC#8870; alone it is a no-op robustness fix.

CI: all fine at https://github.com/fstagni/Pilot/actions/runs/42587420596

…irements

dirac-wms-cpu-normalization may no longer print a DB12 'Estimated CPU
power' line (DB12 can be disabled via
Operations/JobScheduling/RunDB12Benchmark, leaving only the HS23 table
lookup). Parse the factor defensively, pass
--CPUNormalizationFactor only when available, and fall back to
expressing the queue length in wall-clock seconds otherwise.
@fstagni
fstagni force-pushed the feat/hs23-cpu-normalization branch from 5748301 to f65cf0e Compare November 9, 2026 08:38
@fstagni
fstagni changed the base branch from master to devel November 9, 2026 08:49
@fstagni
fstagni marked this pull request as ready for review November 9, 2026 14:17
@fstagni fstagni changed the title Tolerate a missing CPU normalization factor in ConfigureCPURequirements [devel] Tolerate a missing CPU normalization factor in ConfigureCPURequirements Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant