26 lines
1.6 KiB
Bash
Executable file
26 lines
1.6 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
|
set -uo pipefail
|
|
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
|
L=/srv/builds/_adv-adv-mixer-2/logs
|
|
mkdir -p "$L"
|
|
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
|
local name="$1" thr="$2" mn="$3"; shift 3
|
|
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
|
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
|
echo $! > "$L/$name.pid"
|
|
wait $!
|
|
local rc=$?
|
|
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
|
rm -f "$L/$name.pid"
|
|
}
|
|
run avalanche-genesis 1 1 avalanche --index 20729 --states 1024
|
|
run avalanche-plant-alleq 1 1 avalanche --plant alleq --states 1024
|
|
run avalanche-plant-rot1 1 1 avalanche --plant rot1 --states 1024
|
|
run avalanche-plant-weakday 1 1 avalanche --plant weakday --states 1024
|
|
# the worst ROT days of the 2^24 census, read from its log once it exists
|
|
while [ ! -f "$L/census-2p24.log" ] || ! grep -q "end census-2p24" "$L/census-2p24.log"; do sleep 30; done
|
|
for cls in "ROT distinct <= 2" "ROT distinct <= 3" "ROT two same-word pairs sum to 32" "ROT >= 4 in {1,31}" "ROT all 8 in {1,2,30,31}" "ROT >= 4 in {8,16,24}" "ROT column set == diagonal set"; do
|
|
d=$(grep -F "| $cls |" "$L/census-2p24.log" | head -1 | sed -n 's/.*day \([0-9]*\):.*/\1/p')
|
|
[ -n "$d" ] && run "avalanche-day-$d" 1 1 avalanche --index "$d" --states 1024
|
|
done
|