-
Notifications
You must be signed in to change notification settings - Fork 26
/
run_nbody.sh
executable file
·58 lines (46 loc) · 1.48 KB
/
run_nbody.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
#!/bin/bash
run=true
run_compare=false
compare_only=false
get_flag_list=false
cd "$(dirname "$0")"
PathToMilkyWayAtHomeClientDirectory="$(pwd)"
echo "Path to milkywayathome_client directory: $PathToMilkyWayAtHomeClientDirectory"
cd build/bin
if $run
then
./milkyway_nbody \
-f $PathToMilkyWayAtHomeClientDirectory/nbody/sample_workunits/for_developers.lua \
-o $PathToMilkyWayAtHomeClientDirectory/output/output.out \
-z $PathToMilkyWayAtHomeClientDirectory/output/output.hist \
-n 8 -b -w 1 -P -e 54231651 \
-i 4.0 1.0 0.2 0.2 12.0 0.2 \
fi
if $run_compare
then
./milkyway_nbody \
-f $PathToMilkyWayAtHomeClientDirectory/nbody/sample_workunits/for_developers.lua \
-o $PathToMilkyWayAtHomeClientDirectory/output/output.out \
-z $PathToMilkyWayAtHomeClientDirectory/output/output.hist \
-h $PathToMilkyWayAtHomeClientDirectory/input/input.hist \
-n 8 -b -w 1 -P -e 54231651 \
-p 4.0 1.0 0.2 0.2 12.0 0.2 \
fi
#SMU = 222,288.47 SOLAR MASSES
#OPTIONS:
#-s -> compare using only emd and cost component
#-S -> use emd, cost, beta dispersion
#-V -> use emd, cost, velocity dispersion
#-D -> use emd, cost, beta dispersion and velocity dispersion
if $compare_only
then
./milkyway_nbody \
-h $PathToMilkyWayAtHomeClientDirectory/inputs/test_nbody100000.hist \
-S $PathToMilkyWayAtHomeClientDirectory/outputs/resultstemp.hist \
fi
# if you run:
if $get_flag_list
then
./milkyway_nbody --help
# it will show you what all the flags mean
fi