SPB Git

spb/wp24_uqo

Public
583 B · 13 lines shellscript
1#!/bin/bash2# Run all scenarios in parallel (N at a time). Usage: scripts/21_run_all_scenarios.sh [N] [scenario names...]3cd "$(dirname "$0")/.."4N=${1:-8}; shift5if [ $# -gt 0 ]; then NAMES="$@"; else NAMES=$(python3 -c "import sys; sys.path.insert(0,'src'); from agi_ge.scenarios import SCENARIOS; print(' '.join(SCENARIOS))"); fi6mkdir -p logs results/scenarios7for s in $NAMES; do8  while [ "$(jobs -rp | wc -l)" -ge "$N" ]; do sleep 5; done9  echo "launch $s"; python3 -u -W ignore scripts/20_solve_scenario.py "$s" 275 > "logs/scenario_$s.log" 2>&1 &10done11wait12echo "all done"13
Files · main
Menu

Theme