You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parent wait loop: remove the 10 ms usleep polling floor on fast runs #224
The parent process polls the solver child in solve_in_child_fork (src/core/distqldpc.cc):
for (;;) { drainpipe; waitpid(pid, WNOHANG); deadlinecheck; usleep(10000); }
The parent only notices that the child has exited at the next 10 ms tick. Fast runs therefore get a reported wall time quantized into 10 ms buckets: LP_442 with -engine=cc lands at about 23 ms or about 33 ms. In PR #220's quiet interleaved Tier 1 panel, candidate A uses about 9 % more CPU on LP_442, which moves every A run into the upper bucket. The result is a spurious 1.467x cell. This floor affects every engine (MaxSAT and CC), not only CC.
Plan
Smallest sound change: the parent sleeps in poll() on the bounds pipe and on a SIGCHLD self-pipe. The timeout is the remaining -cpu-lim time, capped at 100 ms as a safety net. The child's exit wakes the parent immediately, and bound lines are relayed as soon as they arrive.
Keep the time limit (-cpu-lim wall deadline -> SIGKILL -> TIMEOUT with bounds), the memory cap (prlimit on the process tree) and the kill behaviour unchanged. The solver child's code and output are untouched.
Tier 0: make test-cc, make test-cc-flags, smoke test; answers and logs must be unchanged apart from timing.
yfclab2: Tier 0 + Tier 1 (layout of 972b28c / fecee8c), 5 seeds x {MaxSAT default cardinality, MaxSAT -no-card, CC default}, old vs new binary interleaved on one core per cell. Pass = geomean < 1 and no cell > 1.25. Spot-check a handful of Tier 2/3 codes; Tiers 2-5 are unaffected by construction (the solver is unchanged; the parent only wakes less often).
Activity
GH-224: evidence (Tier 0, interleaved Tier 0/1 panel, Tier 2/3 spot c…
GH-224: MODIFICATIONS note for the parent wait loop
Merge pull request #226 from guluchen/fix/gh-224-wait-floor