From 791ce9f7c673c814d895b6aafb8feae7dcd0975e Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Tue, 6 Oct 2026 12:56:07 +0000 Subject: [PATCH] bench/proof-systems: a failed run keeps its logs beside the row, labelled rows do not overwrite each other Co-Authored-By: Claude Fable 5.1 --- bench/proof-systems/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bench/proof-systems/run.sh b/bench/proof-systems/run.sh index e712e5a1b..7f683890f 100755 --- a/bench/proof-systems/run.sh +++ b/bench/proof-systems/run.sh @@ -32,7 +32,9 @@ row() { # candidate backend host mode-env verify-mode pkill -f sp1-gpu-server 2>/dev/null; rm -f /tmp/sp1-cuda-*.sock local wall; wall=$(python3 -c "import time; print(round(time.time() - $t0, 2))") [ -n "$smi" ] && { kill $smi 2>/dev/null; sleep 1; } local peak; if [ "$backend" = cuda ] && [ -s "$dir/smi.csv" ]; then peak=$(sort -n "$dir/smi.csv" | tail -1); else peak=$(peak_mib "$tlog"); fi - if [ $rc -ne 0 ] || [ ! -f "$res" ]; then printf '{"candidate":"%s","machine":"%s","backend":"%s","fixture":"%s","shard":%s,"na":"the prove run failed (exit %s): %s","date":"%s"}\n' "$cand" "$MACHINE" "$backend" "$(basename "$FIXTURE")" "$SHARD" "$rc" "$(grep -E 'RESULT|rror' "$plog" "$tlog" | tail -1 | tr -d '"' | cut -c1-200)" "$DATE" > "$OUT/$DATE-$MACHINE-$cand.json"; echo "row $cand: failed"; return; fi + # a failed run keeps its logs beside the row (6 October 2026: the 4060's three failures kept one line each) + if [ $rc -ne 0 ] || [ ! -f "$res" ]; then local tag; tag="$DATE-$MACHINE-$cand$( [ -n "$LABEL" ] && printf -- '-%s' "${LABEL// /-}" )"; cp "$plog" "$OUT/$tag.prove.log" 2>/dev/null; cp "$tlog" "$OUT/$tag.time.log" 2>/dev/null; fi + if [ $rc -ne 0 ] || [ ! -f "$res" ]; then printf '{"candidate":"%s","machine":"%s","backend":"%s","fixture":"%s","shard":%s,"na":"the prove run failed (exit %s): %s","date":"%s"}\n' "$cand" "$MACHINE" "$backend" "$(basename "$FIXTURE")" "$SHARD" "$rc" "$(grep -E 'RESULT|rror|panicked|out of memory|OOM' "$plog" "$tlog" | tail -1 | tr -d '"' | cut -c1-300)" "$DATE" > "$OUT/$DATE-$MACHINE-$cand$( [ -n "$LABEL" ] && printf -- '-%s' "${LABEL// /-}" ).json"; echo "row $cand: failed ($(grep -E 'panicked|out of memory|OOM|rror' "$plog" "$tlog" | tail -1 | cut -c1-160))"; return; fi # the verify on one core, three runs local stmt pf; stmt=$(python3 -c "import json; print(json.load(open('$res'))['statement'])"); pf=$(python3 -c "import json; print(json.load(open('$res'))['proof_file'])") local vs=""; for i in 1 2 3; do local v0; v0=$(date +%s.%N); env $env "$host" --mode verify --proof "$pf" --statement "$stmt" > "$dir/verify-$i.log" 2>&1; local vrc=$?; vs="$vs$(python3 -c "import time; print(round(time.time() - $v0, 3))"),"; [ $vrc -ne 0 ] && { echo "row $cand: VERIFY FAILED"; break; }; done