forked from fmihpc/vlasiator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_libraries.sh
executable file
·65 lines (54 loc) · 1.84 KB
/
build_libraries.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
#!/bin/bash
set -e # Abort on error
WORKSPACE=`pwd`
if [[ z$1 != "z" ]]; then
PLATFORM=-$1
else
PLATFORM=""
fi
# Clean up old library build dirs and libraries for this platform
rm -rf library-build libraries${PLATFORM}
# Create new ones
mkdir -p libraries${PLATFORM}/include
mkdir -p libraries${PLATFORM}/lib
mkdir library-build
cd library-build
# Build phiprof
git clone https://github.com/fmihpc/phiprof/
cd phiprof/src
make -j 4 CCC=mpic++
cp ../include/* $WORKSPACE/libraries${PLATFORM}/include
cp ../lib/* $WORKSPACE/libraries${PLATFORM}/lib
cd ../..
# Build VLSV
git clone https://github.com/fmihpc/vlsv.git
cd vlsv
make
cp libvlsv.a $WORKSPACE/libraries${PLATFORM}/lib
cp *.h $WORKSPACE/libraries${PLATFORM}/include
cd ..
# Build papi
if [[ $PLATFORM != "-arriesgado" ]]; then # This fails on RISCV
git clone https://github.com/icl-utk-edu/papi
cd papi/src
./configure --prefix=$WORKSPACE/libraries${PLATFORM} && make -j 4 CC=gcc && make install
cd ../..
fi
# Build jemalloc
wget https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2
tar xjf jemalloc-4.0.4.tar.bz2
cd jemalloc-4.0.4
./configure --prefix=$WORKSPACE/libraries${PLATFORM} --with-jemalloc-prefix=je_ && make -j 4 && make install
cd ..
# Build Zoltan
git clone https://github.com/sandialabs/Zoltan.git
mkdir zoltan-build
cd zoltan-build
if [[ $PLATFORM != "-arriesgado" ]]; then
../Zoltan/configure --prefix=$WORKSPACE/libraries${PLATFORM} --enable-mpi --with-mpi-compilers --with-gnumake --with-id-type=ullong && make -j 4 && make install
else
../Zoltan/configure --prefix=$WORKSPACE/libraries${PLATFORM} --enable-mpi --with-mpi-compilers --with-gnumake --with-id-type=ullong --build=arm-linux-gnu && make -j 4 && make install
cd ..
fi
git clone https://gitlab.com/libeigen/eigen.git
cp -ua eigen/Eigen $WORKSPACE/libraries${PLATFORM}/include