File size: 646 Bytes
a4ba047
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
# Start runs e1, e2, e3 in parallel on epic, each in its own memory-capped scope.
set -euo pipefail
ROOT=$HOME/scratch/hmc-m0-reference-runs
NPROCS=${NPROCS:-10}
CAP=${CAP:-28G}
cd "$ROOT/runs"
for NAME in e1 e2 e3; do
  echo "MemAvailable_kB=$(awk '/MemAvailable/ {print $2}' /proc/meminfo) cap=$CAP nprocs=$NPROCS" > "qsiprep-$NAME.driver.log"
  MEMCAP=$CAP nohup systemd-run --user --scope -q --unit="qsiprep-$NAME" \
    -p MemoryMax="$CAP" -p MemorySwapMax=0 \
    bash "$ROOT/scripts/run-qsiprep.sh" "$NAME" "$NPROCS" >> "qsiprep-$NAME.driver.log" 2>&1 &
done
sleep 5
systemctl --user list-units 'qsiprep-*' --no-legend