forked from goroda/Compressed-Continuous-Computation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·87 lines (71 loc) · 1.53 KB
/
build.sh
File metadata and controls
executable file
·87 lines (71 loc) · 1.53 KB
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
#!/bin/bash
TESTING=0
CLEAN=0
INSTALL=0
while [[ $# > 1 ]]
do
key="$1"
case $key in
-t|--test)
TESTING="$2"
shift
;;
-c|--clean)
CLEAN="$2"
shift
;;
-i|--install)
INSTALL="$2"
shift
;;
--default)
TESTING=0
shift
;;
*)
esac
shift
done
echo TO TEST = "${TESTING}"
echo TO CLEAN = "${CLEAN}"
BUILD_TYPE="None"
CMD_LINE_ARGS=""
cd build
if [ $CLEAN -eq 1 ]
then
make clean
fi
rm -f benchmarks/dmrgprod/bin/dmrgprodbench
rm -f benchmarks/fastmkron/bin/fmkronbench
rm -f benchmarks/qrdecomp/bin/qrbench
cmake ..
make
cd ..
#install on linux
if [ $INSTALL -eq 1 ]
then
sudo rm /usr/lib/libc3*
sudo ln -t /usr/lib lib/libc3.*
fi
#install on mac
if [ $INSTALL -eq 2 ]
then
sudo rm /usr/lib/libc3.*dylib
sudo ln -F lib/libc3.dylib /usr/lib/libc3.dylib # for mac
fi
# add command line options to do this in the future
#Run tests
if [ $TESTING -eq 1 ]
then
./build/test/lib_stringmanip_test/stringmanip_test
./build/test/lib_array_test/array_test
./build/test/lib_linalg_test/linalg_test
./build/test/lib_quadrature_test/quad_test
./build/test/lib_funcs_test/funcs_test
./build/test/lib_clinalg_test/clinalg_test
./build/test/lib_tensor_test/tensor_test
./build/test/lib_tensdecomp_test/tensdecomp_test
./build/test/lib_tensdecomp_test/ttint_test
./build/test/lib_optimization_test/optimization_test
./build/test/lib_probability_test/probability_test
fi