Repository navigation
Description
Phase 2 of #1 measures the two cards project-compute is choosing between, plus a float64 ceiling, on RunsOn. Its runs can't start, because AWS has no on-demand capacity for them in RunsOn's zones. This issue records the workaround, a loop that keeps re-dispatching the runs, and how to restart it on qe-mini1.
The runs
| Instance | Card | Stands in for | Devices | USD/hr |
|---|---|---|---|---|
g7e.2xlarge |
RTX PRO 6000 Blackwell Server Edition | RTX PRO 6000 Max-Q | cpu,gpu |
3.36 |
p4d.24xlarge |
8× A100 SXM4 40 GB | A800 40GB Active | gpu,gpu:2 |
21.96 |
p5.4xlarge |
H100 80 GB | float64 ceiling, optional | cpu,gpu |
6.88 |
Each is a full run with precision_extras on: the matrix, a matmul pass with TF32 off, and the aiyagari_jax and ifp_egm_jax scale scripts. They dispatch from the branch phase2-cloud-cards, which holds the workflow changes. A quick T4 run checked that branch end to end on 2026-10-25. Spend is capped at about USD 50 in all, and each job stops after 60 minutes, so the worst case is about USD 32.
Why they don't start
- No on-demand capacity in RunsOn's two zones. RunsOn's network has subnets only in us-west-2a and us-west-2b. On 2026-10-25, every launch of all three types failed there with
InsufficientInstanceCapacity. - RunsOn gives up after about 45 minutes, in one of two ways. On the first batch it made six launch attempts, then logged "Queued job exhausted its retry budget and remains queued on GitHub", and the jobs stayed queued without ever launching. On the second it made five, then started a small spot "fallback" instance (an
m8i-flex.largeorm8id.large) that picked the job up and failed it at "Set up runner" with "Failed to launch runner: We were unable to schedule this runner after 5 attempts". That costs a fraction of a cent and runs nothing. - Spot is no way round it. AWS scores spot capacity 1 out of 10 for all three types in every us-west-2 zone, which suggests the whole region is short.
- RunsOn's logs show this: the CloudWatch log group
/aws/ecs/runs-on-v3/runs-on-workerin us-west-2, filtered by the run's id. Reading them needs AWS access, whichqe-mini1doesn't have.
The retry loop
precision/phase2_retry.sh on phase2-cloud-cards:
- Every two hours it cancels each run still queued, and dispatches a fresh one in place of each run that is queued or was failed by RunsOn's fallback. RunsOn then makes a new round of attempts.
- Every five minutes it checks whether a run has launched, meaning its
Checkoutstep has started on the requested instance, and exits as soon as one has, so the session running it can watch that run. A fallback failure never reachesCheckout. - It never cancels or re-dispatches a run that has launched, so a run that fails can't be paid for twice.
- It stops after 48 hours.
- Its state file has one line per instance still to run: the instance, its devices, and its current run id, or
-for none. The script rewrites the file, and appends each dispatch to<state file>.log.
It started on 2026-10-25 at 20:11 AEDT on Matt's laptop, and stops when that session closes. Its last dispatches are in the first comment below.
Restarting it on qe-mini1
Run only one copy. Two loops would cancel each other's runs. On the laptop, pkill -f phase2_retry.sh stops the old one if it is still going.
cd ~/bench/benchmarks
git fetch -q origin && git switch phase2-cloud-cards && git pull -q
# Cancel Phase 2 runs that RunsOn has given up on
gh run list -R QuantEcon/benchmarks --workflow benchmark.yml --branch phase2-cloud-cards --status queued \
--json databaseId --jq '.[].databaseId' | xargs -n1 gh run cancel -R QuantEcon/benchmarks
# One line per instance still to run; drop any that have finished
printf 'g7e.2xlarge cpu,gpu -\np4d.24xlarge gpu,gpu:2 -\np5.4xlarge cpu,gpu -\n' > ~/bench/phase2_state.txt
tmux new -d -s phase2 'bash precision/phase2_retry.sh ~/bench/phase2_state.txt 48 7200 2>&1 | tee ~/bench/phase2_retry.out'qe-mini1's gh is signed in with the workflow scope, which dispatching and cancelling need (checked 2026-10-25). The loop starts by dispatching all three.
When a run launches
- Watch it to the end:
gh run watch <run id> -R QuantEcon/benchmarks. - If it failed, read the log before trying again. For example, the
p4d's fabric-manager step has never run, and neither has a Blackwell card on this image. The image's driver, 580.105.08, uses the open kernel module that Blackwell needs. - Download the results:
gh run download <run id> -R QuantEcon/benchmarks -D <directory>. The artifact holdsresults/runson-<instance>/andlectures/results/runson-<instance>/, which go onphase2-cloud-cardswith the findings. - Restart the loop for the instances still waiting. Keep their lines in the state file with their current run ids, so the loop cancels those before it re-dispatches.
If capacity never appears
Renting outside RunsOn, for example Lambda's single A100 40 GB at USD 1.99 an hour for the A800's stand-in, is Matt's decision, to consider later. The status is tracked in QuantEcon/project-benchmarks-jax#1.
🤖 Generated with Claude Code
Activity
mmcky commentedon Oct 25, 2026
Dispatches so far (AEDT). The loop is running on Matt's laptop.
g7e.2xlarge,p4d.24xlarge,p5.4xlargeg7e.2xlargep4d.24xlargep5.4xlargeThe next round is due at about 22:11, if none of these launches first.
mmcky commentedon Oct 25, 2026
Second round, and a fix to the loop (AEDT).
InsufficientInstanceCapacity; at 20:50 RunsOn failed them from fallback instancesg7e.2xlargep4d.24xlargep5.4xlargeThe loop took the fallback failures for launches and stopped. Since 6eae59a it counts a run as launched only once its
Checkoutstep has started, and re-dispatches one that failed before that. It restarted at 20:53 on Matt's laptop; the next round is due at about 22:53.mmcky commentedon Oct 25, 2026
Plan revised (2026-10-25, from project-compute): split the providers. EC2 is short of capacity for all three types, so:
g7e.2xlargeif it launches; otherwise RunPod's RTX PRO 6000 (secure cloud), by hand.g7ein us-east-2 only with Matt's yes, since it is outside RunsOnp5.4xlargeCapacity BlockThe
p4dandp5runs are cancelled. The retry loop now holds only theg7e: run 40183653582, dispatched 21:10 AEDT.On every card: the precision matrix; matmul again with TF32 off; five lectures as written, three times each (
overborrowing,wealth_dynamics_jax,schelling_shocks,opt_invest,hopenhayn); and theaiyagari_jaxandifp_egm_jaxscale scripts. As a bonus, if Lambda has a 2× A100 free, the Bellman workloads asgpu:2, withnvidia-smi topo -mshowing whether the cards share NVLink. The budget is about USD 50 in all; check with Matt before going over, or before any Capacity Block.Ready on
phase2-cloud-cards:precision/run_by_hand.sh<provider>-<instance> [devices] [--quick]does all of the above on a rented machine. It recordsnvidia-smi, its topology, the driver and the CPU; installs Python 3.12 with uv; picksjax[cuda13]on a 580+ driver, and otherwisejax[cuda12]with acuda12label; stops if JAX sees no GPU; and packs everything into<host>-<date>.tgz. It passed a--quicktest from a fresh clone onqe-wharton1-gpu.precision/lambda.shdrives Lambda's API:capacity,wait,add-key,launch,listandterminate. The capacity field isregions_with_capacity_available, confirmed from Lambda's OpenAPI spec 1.10.0. The script was checked against the live API with a dummy key, which every subcommand reports asglobal/invalid-api-key.precision_extrasnow also runs the five lectures, for ag7ethat launches on RunsOn. Quick check: run 40184217121 on a T4. Read its result before relying on that step.Tomorrow, for the A100 on Lambda (from
qe-mini1, in a checkout ofphase2-cloud-cards):~/.config/lambda/api_keywithchmod 600. Don't paste it into a chat.bash precision/lambda.sh add-keyregisters~/.ssh/id_ed25519.pub. Thenbash precision/lambda.sh capacity a100shows the A100 types, their prices and where they are free.bash precision/lambda.sh wait <type>gives a region.bash precision/lambda.sh launch <type> <region>gives an instance id, andlistgives its IP once it is active.ubuntu: clonephase2-cloud-cards, then intmuxrunbash precision/run_by_hand.sh lambda-<type>..tgzoff the instance, thenbash precision/lambda.sh terminate <id>, and checklistto make sure it is gone.For the RTX PRO 6000 on RunPod: start a secure-cloud pod with SSH, then follow step 4 with host
runpod-rtx-pro-6000. The script's GPU check is the Blackwell smoke test. Stop and delete the pod afterwards.Also tomorrow:
qe-wharton2's M5 Pro (64 GB) is being connected. Once it is onboarded it joins the precision matrix and #4's whole-lecture set, as the M6 did.mmcky commentedon Nov 1, 2026
Closing: Phase 2 ran outside RunsOn, so the retry loop is no longer needed. RunsOn never got capacity for these types in us-west-2a or 2b, so on 2026-10-26 the cards were rented by hand instead, as the revised plan above proposed:
g7e.2xlarge, on demand in us-east-2a, outside RunsOng5The run record, with the hosts, the cost (about USD 6) and what didn't run, is
precision/runs/2026-10-26/README.md. The follow-up sessions of 2026-11-01 are in #21.No Phase 2 run is queued or running on
phase2-cloud-cards, and the loop isn't running anywhere (checked 2026-11-01). If a later phase needs a card RunsOn can't place, this issue still describes the loop and its restart.