-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
89 lines (79 loc) · 1.75 KB
/
setup.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
:<<'END'
required:
-------
$RES/files/mm_script
job.sh cp
launcher.slurm cp
$RES/files/bak/
mocca.ini cp
mocca-072016 cp
output:
-----
$WORK/Models
...
/param
ct=0
paramlist_all
job.sh
launcher.slurm
/stdout
END
RES='/work/04159/domij'
WORK='/scratch/04159/domij'
i=0
var_model=3 # King model
var_w0=6
var_Mmax=100.0 # max star mass
var_amax=10747.0 # max semi-major ~50AU
var_equalM=0.8 # equal mass cass
var_seed=20160502 #
var_tcrit=13050.0
var_vns=190.0 # NS kick v
var_vbh=190.0 # BH kick v
#models=(5 12 14 18 21)
if [ ! -d $WORK/Models ]; then
mkdir $WORK/Models
cd $WORK/Models
for var_n in {500000,1000000}
do
for var_z in {0.00005,0.0005,0.005}
do
for var_fb in {0.0,0.1,0.2,0.3,0.4,0.5}
do
for var_rt in {25,50,100}
do
for var_rplum in {20.0,25.0,60.0}
do
i=$((i+1))
for j in {6..10}
do
# for k in {0..4}
# do
# if [[ "$i" =~ ${models[k]} ]]
# then
# rm -r model-$i-$j
mkdir model-$i-$j
cp $RES/files/bak/mocca.ini model-$i-$j/.
cp $RES/files/bak/mocca-072016 model-$i-$j/mocca-$i-$j
sed -i.bak "s|var_n|${var_n}|g ;s|var_z|${var_z}|g ;s|var_fb|${var_fb}|g ;s|var_rplum|${var_rplum}|g ;s|var_rt|${var_rt}|g" model-$i-$j/mocca.ini
# fi
done
done
done
done
done
done
mkdir $WORK/param
mkdir $WORK/param/stdout
touch $WORK/param/ct=0
cp $RES/files/mm_script/job.sh $WORK/param/
cp $RES/files/mm_script/launcher.slurm $WORK/param/
for model in `ls -d $WORK/Models/model-* | rev | cut -d '/' -f 1 | rev`
do
model=${model:6}
echo "./job.sh" $model "\$TACC_LAUNCHER_JID" >> $WORK/param/paramlist_all
done
else
echo "check existing Models"
fi