PC 1 helper scripts: the 0.3.20 helper is started over an empty cmd.txt and its heartbeat waited for (the update-return lane's cleared sequence, 01:17 BST); repeated when helper.alive is stale; a refused start (0x800710E0) or no heartbeat in 60 s stops the lock path and reports; the padding removed; the 5080 grid republishes as -d
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
6be66a0c4b
commit
d7ae2367a0
4 changed files with 55 additions and 18 deletions
|
|
@ -30,16 +30,31 @@ $t = 0; while ($t -lt 150 -and $apps.Count -gt 0) { Start-Sleep -Seconds 5; $t +
|
|||
"RESULT card $(Stamp) $(if ($apps.Count -eq 0) { "quiet after $t s (the runner's --cards-off took)" } else { "UNCONFIRMED: $($apps -join '; ')" })"
|
||||
# ---- the helper (the lock path), as pc1-v4-efficiency.ps1 ----
|
||||
$helperDir = Join-Path $env:LOCALAPPDATA 'igneum\app\sweep'; $cmdFile = Join-Path $helperDir 'cmd.txt'; $helperLog = Join-Path $helperDir 'helper.log'
|
||||
function HelperAliveAge() { $a = Join-Path $helperDir 'helper.alive'; if (-not (Test-Path -LiteralPath $a)) { return 9999 }; try { $v = [int64]((Get-Content -LiteralPath $a -Raw).Trim()); return ([int64][double]::Parse((Get-Date -UFormat %s)) - $v) } catch { return 9999 } }
|
||||
# the 0.3.20 helper's skip rule (update-return lane, 8 October 2026, 01:17 BST): it skips the first N lines of cmd.txt, N = the line count
|
||||
# when it started, for its whole life; so every job starts it over an EMPTY file (skip 0), waits for helper.alive within 4 s, and repeats
|
||||
# the sequence whenever helper.alive is stale (the helper idle-exits 20 min after its last command). A refused start (0x800710E0) or no fresh
|
||||
# heartbeat within 60 s stops the lock path: nothing escalates, nothing not set is restored, the text goes on a RESULT line.
|
||||
function HelperReset() {
|
||||
Set-Content -LiteralPath $cmdFile -Value '' -NoNewline -Encoding ascii
|
||||
try { Stop-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue } catch { }
|
||||
Start-Sleep -Seconds 2
|
||||
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false }
|
||||
$t = 0
|
||||
while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
|
||||
'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates'
|
||||
return $false
|
||||
}
|
||||
function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if (Test-Path $f) { foreach ($l in (Get-Content -LiteralPath $f -ErrorAction SilentlyContinue)) { if ($l -match '(?:^|\s)(\d{1,6}) (?:dev|pl|lgc|rgc|lmc|rmc|nvidia-smi|reregister)\b') { $v = [int]$Matches[1]; if ($v -gt $m) { $m = $v } } } } }; return $m + 100 }
|
||||
function HelperSend([string] $verb) {
|
||||
$s0 = HelperSeqBase; $s1 = $s0 + 1
|
||||
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
|
||||
$pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
if ((HelperAliveAge) -gt 10) { if (-not (HelperReset)) { return "no helper (the reset failed)" } }; Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
$t = 0; while ($t -lt 30) { Start-Sleep -Seconds 1; $t++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark) { $hit = $new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s1 nvidia-smi " } | Select-Object -First 1; if ($hit) { return ($hit -replace '^\d+\s+', '') } } }
|
||||
return "no helper.log line for seq $s1 within 30 s"
|
||||
}
|
||||
$viaHelper = $false
|
||||
if (Get-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue) { try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop; Start-Sleep -Seconds 3; $viaHelper = $true; 'RESULT helper task started' } catch { "RESULT helper start failed: $_" } } else { 'RESULT helper task not registered: the locked state is skipped' }
|
||||
if (Get-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue) { $viaHelper = (HelperReset); if ($viaHelper) { 'RESULT helper task up over an empty cmd.txt' } } else { 'RESULT helper task not registered: the locked state is skipped' }
|
||||
# ---- the sampler ----
|
||||
$samples = Join-Path $jobDir 'nv-samples.csv'; if (Test-Path $samples) { Remove-Item -LiteralPath $samples -Force }
|
||||
$sampler = Start-Process -FilePath $smi -ArgumentList @('-i', $idx, '--query-gpu=timestamp,power.draw,clocks.sm,clocks.mem,temperature.gpu,utilization.gpu,power.draw.instant,power.draw.average', '--format=csv,noheader,nounits', '-lms', '1000') -RedirectStandardOutput $samples -WindowStyle Hidden -PassThru
|
||||
|
|
|
|||
|
|
@ -41,16 +41,31 @@ $t = 0; while ($t -lt 150 -and $apps.Count -gt 0) { Start-Sleep -Seconds 5; $t +
|
|||
"RESULT card $(Stamp) $(if ($apps.Count -eq 0) { "quiet after $t s (the runner's --cards-off took)" } else { "UNCONFIRMED: $($apps -join '; ')" })"
|
||||
# ---- the helper (the lock path), as pc1-v4-efficiency.ps1 ----
|
||||
$helperDir = Join-Path $env:LOCALAPPDATA 'igneum\app\sweep'; $cmdFile = Join-Path $helperDir 'cmd.txt'; $helperLog = Join-Path $helperDir 'helper.log'
|
||||
function HelperAliveAge() { $a = Join-Path $helperDir 'helper.alive'; if (-not (Test-Path -LiteralPath $a)) { return 9999 }; try { $v = [int64]((Get-Content -LiteralPath $a -Raw).Trim()); return ([int64][double]::Parse((Get-Date -UFormat %s)) - $v) } catch { return 9999 } }
|
||||
# the 0.3.20 helper's skip rule (update-return lane, 8 October 2026, 01:17 BST): it skips the first N lines of cmd.txt, N = the line count
|
||||
# when it started, for its whole life; so every job starts it over an EMPTY file (skip 0), waits for helper.alive within 4 s, and repeats
|
||||
# the sequence whenever helper.alive is stale (the helper idle-exits 20 min after its last command). A refused start (0x800710E0) or no fresh
|
||||
# heartbeat within 60 s stops the lock path: nothing escalates, nothing not set is restored, the text goes on a RESULT line.
|
||||
function HelperReset() {
|
||||
Set-Content -LiteralPath $cmdFile -Value '' -NoNewline -Encoding ascii
|
||||
try { Stop-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue } catch { }
|
||||
Start-Sleep -Seconds 2
|
||||
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false }
|
||||
$t = 0
|
||||
while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
|
||||
'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates'
|
||||
return $false
|
||||
}
|
||||
function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if (Test-Path $f) { foreach ($l in (Get-Content -LiteralPath $f -ErrorAction SilentlyContinue)) { if ($l -match '(?:^|\s)(\d{1,6}) (?:dev|pl|lgc|rgc|lmc|rmc|nvidia-smi|reregister)\b') { $v = [int]$Matches[1]; if ($v -gt $m) { $m = $v } } } } }; return $m + 100 }
|
||||
function HelperSend([string] $verb) {
|
||||
$s0 = HelperSeqBase; $s1 = $s0 + 1
|
||||
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
|
||||
$pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
if ((HelperAliveAge) -gt 10) { if (-not (HelperReset)) { return "no helper (the reset failed)" } }; Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
$t = 0; while ($t -lt 30) { Start-Sleep -Seconds 1; $t++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark) { $hit = $new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s1 nvidia-smi " } | Select-Object -First 1; if ($hit) { return ($hit -replace '^\d+\s+', '') } } }
|
||||
return "no helper.log line for seq $s1 within 30 s"
|
||||
}
|
||||
$viaHelper = $false
|
||||
if (Get-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue) { try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop; Start-Sleep -Seconds 3; $viaHelper = $true; 'RESULT helper task started' } catch { "RESULT helper start failed: $_" } } else { 'RESULT helper task not registered: the locked state is skipped' }
|
||||
if (Get-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue) { $viaHelper = (HelperReset); if ($viaHelper) { 'RESULT helper task up over an empty cmd.txt' } } else { 'RESULT helper task not registered: the locked state is skipped' }
|
||||
# ---- the sampler ----
|
||||
$samples = Join-Path $jobDir 'nv-samples.csv'; if (Test-Path $samples) { Remove-Item -LiteralPath $samples -Force }
|
||||
$sampler = Start-Process -FilePath $smi -ArgumentList @('-i', $idx, '--query-gpu=timestamp,power.draw,clocks.sm,clocks.mem,temperature.gpu,utilization.gpu,power.draw.instant,power.draw.average', '--format=csv,noheader,nounits', '-lms', '1000') -RedirectStandardOutput $samples -WindowStyle Hidden -PassThru
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ case "$STEP" in
|
|||
ca4-exe) $P add --kind fetch --target ae432dc7 --id fetch-ca4-sparse-exe-20261007 --file "$KITS/ca4/igneum-worker-cuda-ca4sparse.exe" --dir jobs --title "CA4 research: the SM-sparse worker exe (scratch build, counter-asic-4)" --expires-hours 36 $DEPLOY ;;
|
||||
ca4-sparse) $P add --kind run --target ae432dc7 --id run-ca4-pc1-ca4sparse-5090-20261007 --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 70 --title "CA4 research: SM-sparse worker variants on the RTX 5090, unlocked and at the 1,300 MHz knee, v4 and v3 (the card alone)" --expires-hours 36 $DEPLOY ;;
|
||||
eff-5090-floor2) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-eff-5090-floor2-20261007 --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 45 --title "CA3 PC 1: class v4 efficiency pass 3 on the RTX 5090 (1,100 MHz down to the driver floor, v4 against v3, the card alone)" --expires-hours 36 $DEPLOY ;;
|
||||
eff-5080) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-eff-5080-20261007-c --cards-off "nvidia:NVIDIA GeForce RTX 5080" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 75 --title "CA3 PC 1: class v4 efficiency pass on the RTX 5080 (clock locks, v4 against v3, the card alone)" --expires-hours 36 $DEPLOY ;;
|
||||
eff-5080) $P add --kind run --target ae432dc7 --id run-ca3-pc1-v4-eff-5080-20261007-d --cards-off "nvidia:NVIDIA GeForce RTX 5080" --script tools/ca3-v4-amend/pc1-v4-efficiency.ps1 --timeout-minutes 75 --title "CA3 PC 1: class v4 efficiency pass on the RTX 5080 (clock locks, v4 against v3, the card alone)" --expires-hours 36 $DEPLOY ;;
|
||||
helper-diag2) $P add --kind run --target ae432dc7 --id run-ca3-pc1-helper-diag2-20261007 --script tools/ca3-v4-amend/pc1-helper-diag2.ps1 --timeout-minutes 5 --title "PC 1: Power Helper diagnostic 2 (the task exe against the running app, scheduler history, crash log, a 20 s unelevated helper probe)" --expires-hours 12 $DEPLOY ;;
|
||||
ca4-mb-exe) $P add --kind fetch --target ae432dc7 --id fetch-ca4-microbench-exe-20261007 --file "$KITS/ca4/igneum-worker-cuda-ca4mb.exe" --dir jobs --title "CA4 research: the microbench worker exe (scratch build)" --expires-hours 36 $DEPLOY ;;
|
||||
ca4-mb) $P add --kind run --target ae432dc7 --id run-ca4-pc1-microbench-5090-20261007 --cards-off "nvidia:NVIDIA GeForce RTX 5090" --script tools/ca3-v4-amend/pc1-ca4-microbench.ps1 --timeout-minutes 60 --title "CA4 research: per-block micro-benchmark on the RTX 5090, unlocked and at the 1,300 MHz knee (the card alone)" --expires-hours 36 $DEPLOY ;;
|
||||
|
|
|
|||
|
|
@ -128,6 +128,21 @@ $helperLog = Join-Path $helperDir 'helper.log'
|
|||
# tuned the 5080 at seqs 423596 to 423598 while this script wrote 419500 to 419527, so every lock from 1,000 MHz down and the
|
||||
# closing reset were skipped as stale and the card stayed locked); the base is therefore the maximum over cmd.txt AND helper.log,
|
||||
# re-read after every timeout
|
||||
function HelperAliveAge() { $a = Join-Path $helperDir 'helper.alive'; if (-not (Test-Path -LiteralPath $a)) { return 9999 }; try { $v = [int64]((Get-Content -LiteralPath $a -Raw).Trim()); return ([int64][double]::Parse((Get-Date -UFormat %s)) - $v) } catch { return 9999 } }
|
||||
# the 0.3.20 helper's skip rule (update-return lane, 8 October 2026, 01:17 BST): it skips the first N lines of cmd.txt, N = the line count
|
||||
# when it started, for its whole life; so every job starts it over an EMPTY file (skip 0), waits for helper.alive within 4 s, and repeats
|
||||
# the sequence whenever helper.alive is stale (the helper idle-exits 20 min after its last command). A refused start (0x800710E0) or no fresh
|
||||
# heartbeat within 60 s stops the lock path: nothing escalates, nothing not set is restored, the text goes on a RESULT line.
|
||||
function HelperReset() {
|
||||
Set-Content -LiteralPath $cmdFile -Value '' -NoNewline -Encoding ascii
|
||||
try { Stop-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue } catch { }
|
||||
Start-Sleep -Seconds 2
|
||||
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false }
|
||||
$t = 0
|
||||
while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
|
||||
'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates'
|
||||
return $false
|
||||
}
|
||||
function HelperSeqBase() {
|
||||
$m = 0
|
||||
foreach ($f in @($cmdFile, $helperLog)) { if (Test-Path $f) { foreach ($l in (Get-Content -LiteralPath $f -ErrorAction SilentlyContinue)) { if ($l -match '(?:^|\s)(\d{1,6}) (?:dev|pl|lgc|rgc|lmc|rmc|nvidia-smi|reregister)\b') { $v = [int]$Matches[1]; if ($v -gt $m) { $m = $v } } } } }
|
||||
|
|
@ -140,8 +155,7 @@ if (-not $elevated) {
|
|||
if ($task) {
|
||||
try {
|
||||
$seq = HelperSeqBase
|
||||
Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop
|
||||
Start-Sleep -Seconds 3
|
||||
if (-not (HelperReset)) { throw 'the helper did not come up (see the RESULT helper lines)' }
|
||||
$viaHelper = $true
|
||||
"RESULT helper task 'Igneum Power Helper' state=$((Get-ScheduledTask -TaskName 'Igneum Power Helper').State) started; commands through $cmdFile from seq $seq; results from $helperLog"
|
||||
} catch { "RESULT helper task present but Start-ScheduledTask failed: $_" }
|
||||
|
|
@ -151,7 +165,7 @@ function HelperSend([string] $verb) {
|
|||
$script:seq += 2
|
||||
$s0 = $script:seq; $s1 = $script:seq + 1; $script:seq = $s1
|
||||
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
|
||||
$pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
if ((HelperAliveAge) -gt 10) { if (-not (HelperReset)) { return "no helper (the reset failed)" } }; Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
$t = 0
|
||||
while ($t -lt 30) {
|
||||
Start-Sleep -Seconds 1; $t++
|
||||
|
|
@ -168,7 +182,7 @@ function HelperSend([string] $verb) {
|
|||
$script:seq = $base
|
||||
$s0 = $script:seq; $s1 = $script:seq + 1; $script:seq = $s1
|
||||
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
|
||||
$pad = ((0..3) | ForEach-Object { "$($s0 - 8 + 2 * $_) dev $idx" }) -join "`n"; Set-Content -LiteralPath $cmdFile -Value "$pad`n$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
if ((HelperAliveAge) -gt 10) { if (-not (HelperReset)) { return "no helper (the reset failed)" } }; Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n$s1 $verb`n" -NoNewline -Encoding ascii
|
||||
$t = 0
|
||||
while ($t -lt 30) {
|
||||
Start-Sleep -Seconds 1; $t++
|
||||
|
|
@ -186,19 +200,12 @@ function SetLock([int] $mhz) {
|
|||
}
|
||||
if ($viaHelper) {
|
||||
$out = HelperSend "lgc $mhz"
|
||||
if ($out -match 'not have permission|No permission|Insufficient|not supported|Unable|ERROR|no helper.log') { return "refused: $out" }
|
||||
if ($out -match 'not have permission|No permission|Insufficient|not supported|Unable|ERROR|no helper') { return "refused: $out" }
|
||||
return "ok (helper, -lgc 0,$mhz): $out"
|
||||
}
|
||||
return 'refused: not elevated and no helper task'
|
||||
}
|
||||
function RestartHelper() {
|
||||
# the floor pass of 20:21Z lost the helper at its 1,000 MHz step (no helper.log answer for that and every later command, the
|
||||
# lock most likely hanging inside the helper's nvidia-smi call) and its closing reset never ran: before a reset the task is
|
||||
# stopped and started again (the owning user may do both without a prompt), so a stuck helper never holds the card locked
|
||||
try { Stop-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction SilentlyContinue } catch { }
|
||||
Start-Sleep -Seconds 3
|
||||
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop; Start-Sleep -Seconds 3; return $true } catch { "RESULT helper restart failed: $_"; return $false }
|
||||
}
|
||||
function RestartHelper() { return (HelperReset) }
|
||||
function AppClock() { $a = @(& $smi -i $idx --query-gpu=clocks.applications.graphics --format=csv,noheader 2>&1 | ForEach-Object { "$_" }) | Select-Object -First 1; return "$a" }
|
||||
function ResetClocks() {
|
||||
if ($elevated) { return ((& $smi -i $idx -rgc 2>&1 | Out-String).Trim() -replace '\s+', ' ') }
|
||||
|
|
|
|||
Loading…
Reference in a new issue