926 / code /run_B.sh
jamie33's picture
Restore root files
9b789e2 verified
Raw History Blame Contribute Delete
618 Bytes
#!/usr/bin/env bash
# 926/B on two GPUs: odd subjects on GPU 0, even on GPU 1. Resumable.
set -uo pipefail
cd "$(dirname "$0")"
PY=/home/hubin/workspace/.venv-e6/bin/python
OUT=/home/hubin/926/results/B/per_subject
LOG=/home/hubin/926/logs
mkdir -p "$OUT" "$LOG"
run_gpu() {
local gpu=$1; shift
for s in "$@"; do
CUDA_VISIBLE_DEVICES=$gpu PYTHONUNBUFFERED=1 $PY b_inputs.py --subject "$s" --out "$OUT/$s.json" \
>> "$LOG/B_$s.log" 2>&1 && echo "B done $s" || echo "B FAILED $s"
done
}
run_gpu 0 sub01 sub03 sub05 sub07 sub09 sub11 &
run_gpu 1 sub02 sub04 sub06 sub08 sub10 sub12 &
wait
echo B_ALL_DONE