-
Notifications
You must be signed in to change notification settings - Fork 3
/
bootstrap.sh
executable file
·102 lines (88 loc) · 2.26 KB
/
bootstrap.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
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
#!/bin/bash
#
# This is an easy-bake script to download and build all FILO's external
# dependencies. The dependencies will be built in filo/deps/ and
# installed to filo/install/
#
# Usage:
#
# ./bootstrap.sh
ROOT="$(pwd)"
mkdir -p deps
mkdir -p install
INSTALL_DIR=$ROOT/install
cd deps
lwgrp=lwgrp-1.0.2
dtcmp=dtcmp-1.0.3
if [ ! -f ${lwgrp}.tar.gz ] ; then
wget https://github.com/hpc/lwgrp/releases/download/v1.0.2/${lwgrp}.tar.gz
fi
if [ ! -f ${dtcmp}.tar.gz ] ; then
wget https://github.com/hpc/dtcmp/releases/download/v1.0.3/${dtcmp}.tar.gz
fi
repos=(https://github.com/ECP-Veloc/KVTree.git
https://github.com/ECP-Veloc/AXL.git
https://github.com/ECP-Veloc/spath.git
)
for i in "${repos[@]}" ; do
# Get just the name of the project (like "mercury")
name=$(basename $i | sed 's/\.git//g')
if [ -d $name ] ; then
echo "$name already exists, skipping it"
else
git clone $i
fi
done
rm -rf ${lwgrp}
tar -zxf ${lwgrp}.tar.gz
pushd ${lwgrp}
./configure CFLAGS="-g -O0" \
--prefix=${INSTALL_DIR} && \
make && \
make install
if [ $? -ne 0 ]; then
echo "failed to configure, build, or install liblwgrp"
exit 1
fi
popd
rm -rf ${dtcmp}
tar -zxf ${dtcmp}.tar.gz
pushd ${dtcmp}
./configure CFLAGS="-g -O0" \
--prefix=${INSTALL_DIR} \
--with-lwgrp=${INSTALL_DIR} && \
make && \
make install
if [ $? -ne 0 ]; then
echo "failed to configure, build, or install libdtcmp"
exit 1
fi
popd
cd KVTree
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DMPI=ON ..
make -j `nproc`
make install
cd ../..
cd AXL
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DAXL_ASYNC_DAEMON=OFF -DMPI=ON ..
make -j `nproc`
make install
cd ../..
# spath
cd spath
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DMPI=ON ..
make -j `nproc`
make install
#make test
cd "$ROOT"
echo "*************************************************************************"
echo "Dependencies are all built. You can now build FILO with:"
echo ""
echo " mkdir -p build && cd build"
echo " cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ../"
echo " make"
echo ""
echo "*************************************************************************"