-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain_script.sh
executable file
·75 lines (66 loc) · 1.44 KB
/
main_script.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
#!/bin/bash
cd src
echo "Compile? (y/n)"
read yn
if [ "$yn" == "y" ]
then
make clean
make rmexecs
make
fi
echo "Run tests? (y/n)"
read yntest
if [ "$yntest" == "y" ]
then
./testcode.out
fi
echo "Generate new data for task a? (y/n)"
read yn
if [ "$yn" == "y" ]
then
./task_a.out
fi
echo "Generate new data for task b? (y/n)"
read yn
if [ "$yn" == "y" ]
then
echo "How many threads would you like to run the program with?"
read nthread
mpirun ./task_b.out -n $nthread
fi
echo "Generate new data for task c and d? This may take several hours (y/n)"
read yn
if [ "$yn" == "y" ]
then
echo "How many threads would you like to run the program with?"
read nthread
mpirun ./task_c_d.out -n $nthread
python3 preprocess_big_data.py
fi
echo "Generate new data for task e? (y/n)"
read yn
if [ "$yn" == "y" ]
then
echo "How many threads would you like to run the program with?"
read nthread
mpirun ./task_e.out -n $nthread
python3 preprocess_big_data.py
fi
echo "Generate plots? (y/n)"
read yn
if [ "$yn" == "y" ]
then
python3 plot_probability.py
python3 plot_thermo_quants.py
fi
echo "Compile report? (y/n)"
read yn
if [ "$yn" == "y" ]
then
cd ../doc/
pdflatex -synctex=1 -interaction=nonstopmode CompPhysProj4.tex
bibtex CompPhysProj4.aux
pdflatex -synctex=1 -interaction=nonstopmode CompPhysProj4.tex
bibtex CompPhysProj4.aux
pdflatex -synctex=1 -interaction=nonstopmode CompPhysProj4.tex
fi