125 lines
5.2 KiB
Makefile
125 lines
5.2 KiB
Makefile
PYTHON := python3
|
|
REPO_ROOT := $(abspath .)
|
|
ORCH := $(REPO_ROOT)/scripts/run_orchestration.py
|
|
TRACK1 := $(REPO_ROOT)/scripts/run_track1.py
|
|
|
|
DB := $(REPO_ROOT)/runs/state/cos-orch.sqlite
|
|
RESULT_ROOT := $(REPO_ROOT)/runs/results
|
|
SCRATCH_ROOT := $(REPO_ROOT)/runs/scratch
|
|
MPLCONFIGDIR := $(SCRATCH_ROOT)/matplotlib
|
|
|
|
FIG1_M005 := $(REPO_ROOT)/config/track1_figure1_paper_M_0_05.json
|
|
FIG1_M025 := $(REPO_ROOT)/config/track1_figure1_paper_M_0_25.json
|
|
FIG1_M05 := $(REPO_ROOT)/config/track1_figure1_paper_M_0_5.json
|
|
FIG1_M10 := $(REPO_ROOT)/config/track1_figure1_paper_M_1_0.json
|
|
FIG1_M100 := $(REPO_ROOT)/config/track1_figure1_paper_M_10_0.json
|
|
|
|
.PHONY: help init doctor list-jobs run-one run-loop run-loop-one collate-figure1 track1-sim-smoke \
|
|
rust-check rust-test rust-smoke rust-smoke-release compare-track1-rust-smoke \
|
|
submit-figure1-m005 submit-figure1-m025 submit-figure1-m05 submit-figure1-m10 submit-figure1-m100 \
|
|
submit-all-figure1 status results-tree
|
|
|
|
help:
|
|
@echo "Targets:"
|
|
@echo " init Create run directories and initialize the SQLite registry"
|
|
@echo " doctor Show key paths and verify local orchestration and Track 1 paths"
|
|
@echo " list-jobs List jobs in the local registry"
|
|
@echo " track1-sim-smoke Run one local Track 1 simulation through renunney runner"
|
|
@echo " rust-check Run cargo check for the Track 2 Rust workspace"
|
|
@echo " rust-test Run cargo test for the Track 2 Rust workspace"
|
|
@echo " rust-smoke Run the Track 2 Rust smoke example in debug mode"
|
|
@echo " rust-smoke-release Run the Track 2 Rust smoke example in release mode"
|
|
@echo " compare-track1-rust-smoke Compare Python Track 1 and Rust smoke outputs over a seed range"
|
|
@echo " run-one Claim and run one queued job"
|
|
@echo " run-loop Run worker loop until queue empty"
|
|
@echo " run-loop-one Run exactly one queued job through the worker loop"
|
|
@echo " collate-figure1 Collate completed Track 1 Figure 1 jobs"
|
|
@echo " submit-figure1-m005 Submit Figure 1 paper-scale jobs for M=0.05"
|
|
@echo " submit-figure1-m025 Submit Figure 1 paper-scale jobs for M=0.25"
|
|
@echo " submit-figure1-m05 Submit Figure 1 paper-scale jobs for M=0.5"
|
|
@echo " submit-figure1-m10 Submit Figure 1 paper-scale jobs for M=1.0"
|
|
@echo " submit-figure1-m100 Submit Figure 1 paper-scale jobs for M=10.0"
|
|
@echo " submit-all-figure1 Submit all paper-scale Figure 1 treatments"
|
|
@echo " status Show job status and current result tree"
|
|
@echo " results-tree List the current result files"
|
|
|
|
init:
|
|
mkdir -p $(REPO_ROOT)/runs/state $(REPO_ROOT)/runs/results $(REPO_ROOT)/runs/scratch $(MPLCONFIGDIR)
|
|
$(PYTHON) $(ORCH) init-db --db $(DB)
|
|
|
|
doctor:
|
|
@echo "REPO_ROOT=$(REPO_ROOT)"
|
|
@echo "ORCH=$(ORCH)"
|
|
@echo "TRACK1=$(TRACK1)"
|
|
@echo "DB=$(DB)"
|
|
@echo "RESULT_ROOT=$(RESULT_ROOT)"
|
|
@echo "SCRATCH_ROOT=$(SCRATCH_ROOT)"
|
|
@echo "MPLCONFIGDIR=$(MPLCONFIGDIR)"
|
|
test -f $(ORCH)
|
|
test -f $(TRACK1)
|
|
|
|
list-jobs:
|
|
$(PYTHON) $(ORCH) list --db $(DB)
|
|
|
|
track1-sim-smoke:
|
|
mkdir -p $(MPLCONFIGDIR)
|
|
MPLCONFIGDIR=$(MPLCONFIGDIR) $(PYTHON) $(TRACK1) --mode simulate --K 5000 --N0 50 --n 1 --u 5e-6 --R 10 --T 40 --epochs 8 --seed 1
|
|
|
|
rust-check:
|
|
cargo check --manifest-path $(REPO_ROOT)/Cargo.toml
|
|
|
|
rust-test:
|
|
cargo test --manifest-path $(REPO_ROOT)/Cargo.toml
|
|
|
|
rust-smoke:
|
|
cargo run --manifest-path $(REPO_ROOT)/Cargo.toml --example smoke_compare
|
|
|
|
rust-smoke-release:
|
|
cargo run --release --manifest-path $(REPO_ROOT)/Cargo.toml --example smoke_compare
|
|
|
|
compare-track1-rust-smoke:
|
|
MPLCONFIGDIR=$(MPLCONFIGDIR) PYTHONPATH=$(REPO_ROOT)/src $(PYTHON) $(REPO_ROOT)/scripts/compare_track1_rust_smoke.py --seed-start 0 --seed-count 20
|
|
|
|
run-one:
|
|
mkdir -p $(MPLCONFIGDIR)
|
|
MPLCONFIGDIR=$(MPLCONFIGDIR) $(PYTHON) $(ORCH) run-one --db $(DB) --result-root $(RESULT_ROOT) --scratch-root $(SCRATCH_ROOT)
|
|
|
|
run-loop:
|
|
mkdir -p $(MPLCONFIGDIR)
|
|
MPLCONFIGDIR=$(MPLCONFIGDIR) $(PYTHON) $(ORCH) run-loop --db $(DB) --result-root $(RESULT_ROOT) --scratch-root $(SCRATCH_ROOT)
|
|
|
|
run-loop-one:
|
|
mkdir -p $(MPLCONFIGDIR)
|
|
MPLCONFIGDIR=$(MPLCONFIGDIR) $(PYTHON) $(ORCH) run-loop --db $(DB) --result-root $(RESULT_ROOT) --scratch-root $(SCRATCH_ROOT) --max-jobs 1
|
|
|
|
collate-figure1:
|
|
mkdir -p $(MPLCONFIGDIR)
|
|
MPLCONFIGDIR=$(MPLCONFIGDIR) $(PYTHON) $(ORCH) collate-figure1 --db $(DB) --output $(RESULT_ROOT)/figure1-collated.json
|
|
|
|
submit-figure1-m005:
|
|
$(PYTHON) $(ORCH) submit-figure1 --db $(DB) --config $(FIG1_M005) --job-prefix fig1-m005 --created-by make
|
|
|
|
submit-figure1-m025:
|
|
$(PYTHON) $(ORCH) submit-figure1 --db $(DB) --config $(FIG1_M025) --job-prefix fig1-m025 --created-by make
|
|
|
|
submit-figure1-m05:
|
|
$(PYTHON) $(ORCH) submit-figure1 --db $(DB) --config $(FIG1_M05) --job-prefix fig1-m05 --created-by make
|
|
|
|
submit-figure1-m10:
|
|
$(PYTHON) $(ORCH) submit-figure1 --db $(DB) --config $(FIG1_M10) --job-prefix fig1-m10 --created-by make
|
|
|
|
submit-figure1-m100:
|
|
$(PYTHON) $(ORCH) submit-figure1 --db $(DB) --config $(FIG1_M100) --job-prefix fig1-m100 --created-by make
|
|
|
|
submit-all-figure1: submit-figure1-m005 submit-figure1-m025 submit-figure1-m05 submit-figure1-m10 submit-figure1-m100
|
|
|
|
results-tree:
|
|
find $(RESULT_ROOT) -maxdepth 4 -type f | sort
|
|
|
|
status:
|
|
@echo "Jobs:"
|
|
$(PYTHON) $(ORCH) list --db $(DB)
|
|
@echo
|
|
@echo "Results:"
|
|
find $(RESULT_ROOT) -maxdepth 4 -type f | sort || true
|