#!/usr/bin/env bash # Launch the official CEC-2022 sweep as many single-threaded shards across # cores. Runs are independent and the per-combo resume-skip in # run_cec2022_full.py makes disjoint (algo, seed) shards safe to run # concurrently into one dir. set -u cd /home/admin1/Documents/sonthh/AHD_CMA source .venv/bin/activate OUT=outputs/runs/cec2022_rotated LOG=outputs/logs mkdir -p "$LOG" "$OUT" # One BLAS thread per shard: CEC functions are tiny (10-20 dim), so # multi-threaded BLAS gives no speedup but oversubscribes the cores. export OMP_NUM_THREADS=1 export OPENBLAS_NUM_THREADS=1 export MKL_NUM_THREADS=1 export NUMEXPR_NUM_THREADS=1 export VECLIB_MAXIMUM_THREADS=1 ALGOS=(ahdcma bipop bohb cmaes doa gego grid gwo hyperband ihaho ipop optuna pso random scso woa) # Two seed halves per algo -> 32 shards on 56 cores (leaves headroom for # the BLAS-thread + OS). Each shard runs single-threaded. SEEDS_A="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14" SEEDS_B="15 16 17 18 19 20 21 22 23 24 25 26 27 28 29" n=0 for algo in "${ALGOS[@]}"; do for half in A B; do seeds=$([ "$half" = A ] && echo "$SEEDS_A" || echo "$SEEDS_B") nohup python scripts/run_cec2022_full.py --algos "$algo" --seeds $seeds \ --output "$OUT" > "$LOG/cec_${algo}_${half}.log" 2>&1 & n=$((n+1)) done done echo "launched $n single-threaded shards (16 algos x 2 seed-halves)" wait echo "ALL_CEC_SHARDS_DONE"