-
Notifications
You must be signed in to change notification settings - Fork 3
/
run_within_sim.sh
executable file
·46 lines (37 loc) · 1.08 KB
/
run_within_sim.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
42
43
44
45
#! /usr/bin/zsh
if [ "$#" -ne 4 ]
then
echo "Incorrect number of arguments $#"
exit 1
fi
while getopts g:b:e:c: flag
do
case "${flag}" in
g) gpu=${OPTARG};;
b) begin_init_seed=${OPTARG};;
e) end_init_seed=${OPTARG};;
c) cnt=${OPTARG};;
esac
done
echo "Using $(which python)"
problem_strs=(
"vehiclesafety_5d3d_kumaraswamyproduct"
"dtlz2_8d4d_negl1dist"
"osy_6d8d_piecewiselinear"
"carcabdesign_7d9d_piecewiselinear"
"vehiclesafety_5d3d_piecewiselinear"
"dtlz2_8d4d_piecewiselinear"
"osy_6d8d_sigmodconstraints"
"carcabdesign_7d9d_linear"
)
for i in {$begin_init_seed..$end_init_seed}
do
echo "Running the simulation round $i"
shuffled=( $(shuf -e "${problem_strs[@]}") )
for problem_str in ${shuffled}; do
# echo "GPU=$gpu runs=$num_sim $problem_str"
c="CUDA_VISIBLE_DEVICES=$gpu nice -n 19 python within_session_sim.py --problem_str=$problem_str --noisy=False --init_seed=$i --gen_method=qnei --kernel=default --comp_noise_type=$cnt --device=$gpu"
echo $c
eval $c
done
done