/
run_numascale.sh
executable file
·42 lines (36 loc) · 1.16 KB
/
run_numascale.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
ulimit -u 221184
export SMAC_MEMORY=2048
PAR_PROC=104
OPT=" --scenario-file scenario.txt"
OPT=$OPT" --initial-incumbent RANDOM"
OPT=$OPT" --validation false"
OPT=$OPT" --shared-model-mode true"
OPT=$OPT" --abort-on-first-run-crash false"
if [ $# -eq 1 ] && [ $1 = "--restore" ]; then
for ((i=1;i<=$PAR_PROC;i++)); do
echo "Restoring running" $i " instance of smac with seed " $i
echo "State directory" smac-output/test/state-run$i
numactl --cpunodebind=$i --membind=$i smac/smac $OPT \
--rungroup test-restore \
--restore-scenario smac-output/test/state-run$i \
--seed $i >> "log_run_smac"$i".log" &
done
elif [ $# -eq 2 ] && [ $1 = "--warmup" ]; then
for ((i=1;i<=$PAR_PROC;i++)); do
echo "Running" $i " instance of smac with seed " $i
echo "Warmup state directory" $2
numactl --cpunodebind=$i --membind=$i smac/smac $OPT \
--rungroup test-warmup \
--warmstart $2 \
--seed $i >> "log_run_smac"$i".log" &
done
else
for ((i=1;i<=$PAR_PROC;i++)); do
echo "Running" $i " instance of smac with seed " $i
numactl --cpunodebind=$i --membind=$i smac/smac $OPT \
--rungroup test \
--seed $i > "log_run_smac"$i".log" &
done
fi
wait