forked from HAWinther/FML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile_cola
90 lines (67 loc) · 2.87 KB
/
compile_cola
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
if [ -n "${ROOTDIR}" ]; then
source stop_cola
fi
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# ------------------------------ Basic Settings ------------------------------
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
function addvar () {
local tmp="${!1}" ;
tmp="${tmp//:${2}:/:}" ;
tmp="${tmp/#${2}:/}" ;
tmp="${tmp/%:${2}/}" ;
export $1="${2}:${tmp}" ;
}
if [ -n "${OMP_NUM_THREADS}" ]; then
export OLD_OMP_NUM_THREADS=$OMP_NUM_THREADS
fi
if [ -n "${LD_LIBRARY_PATH}" ]; then
export OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
fi
if [ -n "${PYTHONPATH}" ]; then
export OLD_PYTHONPATH=$PYTHONPATH
fi
if [ -n "${PATH}" ]; then
export OLD_PATH=$PATH
fi
if [ -n "${C_INCLUDE_PATH}" ]; then
export OLD_C_INCLUDE_PATH=$C_INCLUDE_PATH
fi
if [ -n "${CPLUS_INCLUDE_PATH}" ]; then
export OLD_CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH
fi
if [ -n "${SET_INSTALLATION_OPTIONS}" ]; then
source $SET_INSTALLATION_OPTIONS
else
source set_installation_options
fi
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# ---------------------- Activate Virtual Enviroment -------------------------
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
source $ROOTDIR/.local/bin/activate
if [ -n "${GLOBAL_PACKAGES_LOCATION}" ]; then
addvar PYTHONPATH $GLOBAL_PACKAGES_LOCATION/lib/python$PYTHON_VERSION/site-packages
addvar LD_LIBRARY_PATH $GLOBAL_PACKAGES_LOCATION/lib
fi
addvar LD_LIBRARY_PATH $ROOTDIR/.local/lib
addvar PYTHONPATH $ROOTDIR/.local/lib/python$PYTHON_VERSION/site-packages
addvar PYTHONPATH $ROOTDIR/.local/lib
addvar PATH $ROOTDIR/.local/bin
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# ------------------------------- COMPILE COLA -------------------------------
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
cd $ROOTDIR/FML/COLASolver
make clean
make -j $MAKE_NUM_THREADS all
cd $ROOTDIR
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
source stop_cola