interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / evidence / OLLM-AB4-ROUNDS-4-11-20261122 / harness / gpu_round.sh

71 lines · 3184 bytes Raw Blame History
1#!/bin/sh
2# gpu_round.sh N PREV_CK STEPS LRMICRO [LEASE_MIN]
3# One GPU training round for the looped core: tune (CPU) -> claim board -> spark-window (chip lock
4# only, this is training not a timing) -> gtrainf + full geval under spark-receipt -> close -> release.
5# Same commands as run-win3-r3.sh (loop half). Writes $RD/gpu_round.out and $RD/DONE_GPU (rc inside).
6set -u
7N="$1"; PREV="$2"; STEPS="$3"; LR="$4"; LEASE="${5:-18}"
8CAMP=/home/drakestapleton/work/ollm-helix-rlvr-20261121
9VLOOP=/home/drakestapleton/work/ollm-loop-20261121
10OLLM="$CAMP/bin/ollm"
11OLLM_GPU="$CAMP/bin/ollm-helix-gb10"
12MERGES="$VLOOP/data/omega4096.bin"
13BOARD=/home/drakestapleton/handoffs/BOARD.md
14RD="$CAMP/rounds/r$N"
15CK="$CAMP/ckpt/loop_r$N.ck"
16TOK="$RD/r${N}_mix.tok"
17NAME="ollm-rlvr-r$N-gb10"
18LANE="claude-agy-finish"
19rm -f "$RD/DONE_GPU"
20fail() { echo "FAIL $*"; echo "rc=1 $*" > "$RD/DONE_GPU"; exit 1; }
21
22[ -s "$TOK" ] || fail "missing $TOK"
23[ -s "$PREV" ] || fail "missing $PREV"
24[ ! -e "$CK" ] || fail "$CK already exists, refusing to overwrite"
25
26# look first (Play well together): refuse if the chip is busy or another lane holds a claim
27APPS=$(nvidia-smi --query-compute-apps=pid,name --format=csv,noheader 2>/dev/null | wc -l)
28[ "$APPS" = "0" ] || fail "chip busy: $(nvidia-smi --query-compute-apps=pid,name --format=csv,noheader | tr '\n' ';')"
29spark-window status 2>&1 | head -5
30
31"$OLLM" tune "$PREV" "$CK" "$STEPS" "$LR" || fail "tune rc=$?"
32echo "TUNE_OK prev_sha256=$(sha256sum "$PREV" | cut -c1-64) steps=$STEPS lrmicro=$LR"
33
34RUNNER="$RD/run-win-r$N.sh"
35cat > "$RUNNER" <<EOF
36#!/bin/sh
37set -u
38printf "6\n" > /tmp/helix_genome.cfg
39t0=\$(date +%s)
40"$OLLM_GPU" gtrainf "$CK" "$TOK" $STEPS 200 > "$RD/train_loop_r$N.log" 2>&1
41rc_t=\$?
42t1=\$(date +%s)
43echo "LOOP_R${N}_TRAIN rc=\$rc_t sec=\$((t1 - t0))"
44cat "$RD/train_loop_r$N.log"
45sleep 8
46"$OLLM_GPU" geval "$CK" "$VLOOP/data/held.tok" 2475 "$MERGES" > "$RD/geval_loop_r$N.log" 2>&1
47rc_e=\$?
48echo "LOOP_R${N}_HELD_2475 rc=\$rc_e \$(grep '^E ' "$RD/geval_loop_r$N.log")"
49rm -f /tmp/helix_genome.cfg
50[ "\$rc_t" = "0" ] && [ "\$rc_e" = "0" ]
51EOF
52chmod +x "$RUNNER"
53
54echo "$(date -u +%FT%H:%MZ) CLAIM $LANE $NAME to all: GB10 chip lock (lease ${LEASE}m, no quiet lock: training, not a timing) for Round-$N RLVR training of the 15.8M looped Omega LLM (+$STEPS steps) + full 2475-window geval; finishing antigravity's interrupted ab4 campaign at Drake's request; pause/reach me on this board" >> "$BOARD"
55WID=$(spark-window open "$NAME" --lease "$LEASE" --gb10 exclusive --quiet none --wait | tail -n 1)
56echo "OPENED_WINDOW=$WID"
57cleanup() {
58 rm -f /tmp/helix_genome.cfg
59 spark-window close "$WID" >/dev/null 2>&1 || true
60 echo "$(date -u +%FT%H:%MZ) RELEASE $LANE $NAME: done, GPU idle" >> "$BOARD"
61}
62trap cleanup EXIT INT TERM
63XB=$(sudo -n dmesg 2>/dev/null | grep -c "NVRM: Xid" || true)
64spark-window run spark-receipt "$NAME" -- sh "$RUNNER"
65RC=$?
66XA=$(sudo -n dmesg 2>/dev/null | grep -c "NVRM: Xid" || true)
67echo "XID_BEFORE=$XB XID_AFTER=$XA"
68echo "CK_SHA256=$(sha256sum "$CK" | cut -c1-64)"
69echo "RECEIPT=$(ls -t /home/drakestapleton/yardsticks/receipts/*"$NAME"*.json 2>/dev/null | head -1)"
70echo "rc=$RC" > "$RD/DONE_GPU"
71exit "$RC"