interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / streams / math-training / run_retry.sh

11 lines · 451 bytes Raw Blame History
1#!/bin/sh
2# Rerun a GPU script when CUDA context creation fails on fragmented memory (cuDevicePrimaryCtxRetain OOM).
3# Usage: run_retry.sh LOG cmd... Retries up to 30 times, 60 s apart, only for that specific startup failure.
4log=$1; shift
5i=0
6while [ $i -lt 30 ]; do
7 "$@" > "$log" 2>&1 && exit 0
8 grep -q "cuDevicePrimaryCtxRetain" "$log" || exit 1
9 i=$((i+1)); echo "ctx-retry $i $(date -u +%H:%M:%SZ)" >> "$log.retries"; sleep 60
10done
11exit 1