diff --git a/tools/simulators/tsi/tsi-sim-mc/.gitignore b/tools/simulators/tsi/tsi-sim-mc/.gitignore new file mode 100644 index 0000000..c4ee506 --- /dev/null +++ b/tools/simulators/tsi/tsi-sim-mc/.gitignore @@ -0,0 +1,18 @@ +# Generated artifacts +runs/ +results/ +figures/ +!results/.gitkeep +!figures/.gitkeep + +# Python +__pycache__/ +*.py[cod] +*.egg-info/ +.venv/ +venv/ +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ +*.parquet +*.csv diff --git a/tools/simulators/tsi/tsi-sim-mc/Makefile b/tools/simulators/tsi/tsi-sim-mc/Makefile new file mode 100644 index 0000000..4521f9c --- /dev/null +++ b/tools/simulators/tsi/tsi-sim-mc/Makefile @@ -0,0 +1,57 @@ +.PHONY: install smoke sweep sweep-fullscale figures verify test test-slow test-all lint clean + +VENV ?= .venv +PY := $(VENV)/bin/python +PIP := $(VENV)/bin/pip + +# Pin BLAS/OpenMP to a single thread so joblib's N worker processes don't oversubscribe +# the cores (numpy in each worker would otherwise each spawn a full BLAS thread pool). +export OMP_NUM_THREADS := 1 +export OPENBLAS_NUM_THREADS := 1 +export MKL_NUM_THREADS := 1 +export NUMEXPR_NUM_THREADS := 1 + +$(VENV): + python3 -m venv $(VENV) + $(PIP) install --upgrade pip + +install: $(VENV) + $(PIP) install -e ".[dev]" + +# Every sweep writes results + figures into a fresh dated folder under runs/ so new +# runs never overwrite old ones (runs/_