-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_tests
executable file
·181 lines (165 loc) · 6.09 KB
/
run_tests
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#!/bin/bash
####TEST 1: Basic DP Test
#echo "Compiling variational dp test..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/testdp.cpp -lboost_system -o testdp
#if [ -e "testdp" ]
#then
# echo "Done compiling, running test..."
# ./testdp
# rm testdp
# mkdir dpresults
# cp test/dpplot.py dpresults
# mv *.log dpresults
# echo "Done DP! Go to ./dpresults and run python dpplot.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi
####TEST 2: Basic HDP Test
#echo "Compiling variational hdp test..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/testhdp.cpp -lboost_system -o testhdp
#if [ -e "testhdp" ]
#then
# echo "Done! Running test..."
# ./testhdp
# rm testhdp
# mkdir hdpresults
# cp test/hdpplot.py hdpresults
# mv *.log hdpresults
# echo "Done HDP! Go to ./hdpresults and run python hdpplot.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi
###TEST 3: DP Test with Non-standard prior
#echo "Compiling variational dp w/ nonstandard prior test..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/testdpprior.cpp -lboost_system -o testdp
#if [ -e "testdp" ]
#then
# echo "Done compiling, running test..."
# ./testdp
# rm testdp
# mkdir dpresults
# cp test/dppriorplot.py dpresults
# mv *.log dpresults
# echo "Done DP nonstandard prior! Go to ./dpresults and run python dppriorplot.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi
####TEST 4: Thread pool test
#echo "Compiling pool test..."
#g++ -std=c++11 -O3 -I/usr/local/include test/testpool.cpp -lpthread -o testpool
#if [ -e "testpool" ]
#then
# echo "Done compiling, running test..."
# ./testpool
# rm testpool
# echo "Done pool test!"
#else
# echo "Error experienced during compilation, test was not run."
#fi
#
####TEST 5: Matching test
#echo "Compiling matching test..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/testmatching.cpp -o testmatching
#if [ -e "testmatching" ]
#then
# echo "Done compiling, running test..."
# ./testmatching
# rm testmatching
# echo "Done matching test!"
#else
# echo "Error experienced during compilation, test was not run."
#fi
###TEST 6: SDA DP Test
#echo "Compiling sda dp test..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/testsdadp.cpp -lboost_system -lpthread -o testsdadp
#if [ -e "testsdadp" ]
#then
# echo "Done compiling, running test..."
# ./testsdadp
# rm testsdadp
# mkdir sdadpresults
# cp test/sdadpplot.py sdadpresults
# mv *.log sdadpresults
# echo "Done SDA DP! Go to ./sdadpresults and run python sdadpplot.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi
#TEST 7: NIW Test
#echo "Compiling niw test..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/testniw.cpp -lboost_system -lpthread -o testniw
#
#if [ -e "testniw" ]
#then
# echo "Done compiling, running test..."
# ./testniw
# rm testniw
# mkdir niwresults
# cp test/niwplot.py niwresults
# echo "Done testing niw! Go to ./niwresults and run python niwplot.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi
##TEST 8: SDA DP Evaluation
#echo "Compiling sda dp eval..."
#g++ -std=c++11 -O3 -I/usr/include/eigen3 -I/usr/local/include/eigen3 -I/usr/local/include test/src/vb.c test/src/updates.c test/src/costfcn.c test/src/vbfuncs_gaussian.c test/evalsdadp.cpp -lboost_system -lpthread -lgsl -lblas -lrt -o evalsdadp
#if [ -e "evalsdadp" ]
#then
# echo "Done compiling, running test..."
# ./evalsdadp
# rm evalsdadp
# mkdir sdaresults
# cp test/plotevalsdadp.py sdaresults
# mv *.log sdaresults
# echo "Done SDA DP Evaluation! Go to ./sdaresults and run python plotevalsdadp.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi
#TEST 9: MNIST Evaluation
echo "Compiling mnist eval..."
g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/src/vb.c test/src/updates.c test/src/costfcn.c test/src/vbfuncs_gaussian.c test/evalmnist.cpp -lboost_system -lpthread -lgsl -lblas -lrt -o evalmnist
if [ -e "evalmnist" ]
then
echo "Done compiling, running test..."
./evalmnist
rm evalmnist
mkdir mnistresults
cp test/plotMNIST.py mnistresults
mv *.log mnistresults
cp mnistTrain20.txt mnistTest20.txt mnistresults
echo "Done MNIST Evaluation! Go to ./mnistresults and run python evalMNIST.py to visualize the results."
else
echo "Error experienced during compilation, test was not run."
fi
##TEST 10: SUN Evaluation
#echo "Compiling sun eval..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/src/vb.c test/src/updates.c test/src/costfcn.c test/src/vbfuncs_gaussian.c test/evalsun.cpp -lboost_system -lpthread -lgsl -lblas -lrt -o evalsun
#if [ -e "evalsun" ]
#then
# echo "Done compiling, running test..."
# ./evalsun
# rm evalsun
# mkdir sunresults
# cp test/plotSUN.py sunresults
# mv *.log sunresults
# cp sunTrain20.txt sunTest20.txt sunresults
# echo "Done SUN Evaluation! Go to ./sunresults and run python evalSUN.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi
##TEST 10: ADSB Evaluation
#echo "Compiling adsb eval..."
#g++ -std=c++11 -O3 -I/usr/local/include/eigen3 -I/usr/local/include test/src/vb.c test/src/updates.c test/src/costfcn.c test/src/vbfuncs_gaussian.c test/evalplane.cpp -lboost_system -lpthread -lgsl -lblas -lrt -o evaladsb
#if [ -e "evaladsb" ]
#then
# echo "Done compiling, running test..."
# ./evaladsb
# rm evaladsb
# mkdir adsbresults
# cp test/plotadsb.py adsbresults
# mv *.log adsbresults
# mv adsbresults/lf3_train.log adsbresults/lf3_test.log ./
# cp adsbresults/linear_flows_3.log adsbresults/spline_lats.log adsbresults/spline_lons.log adsbresults/boundary_segments.log ./
# echo "Done adsb Evaluation! Go to ./adsbresults and run python plotadsb.py to visualize the results."
#else
# echo "Error experienced during compilation, test was not run."
#fi