build.sh 2.33 KB
Newer Older
Pietro Incardona's avatar
Pietro Incardona committed
1
2
3
#! /bin/bash


4
5
6
7
8
9
10
workspace=$1
hostname=$(hostname)
branch=$3

echo "Directory: $workspace"
echo "Machine: $hostname"
echo "Branch name: $branch"
Pietro Incardona's avatar
Pietro Incardona committed
11

12
echo "Branch: $3"
Pietro Incardona's avatar
Pietro Incardona committed
13
14
15
16
17
18
19
20

# Make a directory in /tmp/openfpm_data

mkdir /tmp/openfpm_io
mv * .[^.]* /tmp/openfpm_io
mv /tmp/openfpm_io openfpm_io

git clone git@git.mpi-cbg.de:openfpm/openfpm_devices.git openfpm_devices
Pietro Incardona's avatar
Pietro Incardona committed
21
cd openfpm_devices
22
git checkout master
Pietro Incardona's avatar
Pietro Incardona committed
23
cd ..
Pietro Incardona's avatar
Pietro Incardona committed
24
git clone git@git.mpi-cbg.de:openfpm/openfpm_data.git openfpm_data
Pietro Incardona's avatar
Pietro Incardona committed
25
cd openfpm_data
26
git checkout master
Pietro Incardona's avatar
Pietro Incardona committed
27
cd ..
Pietro Incardona's avatar
Pietro Incardona committed
28
git clone git@git.mpi-cbg.de:openfpm/openfpm_pdata.git openfpm_pdata
Pietro Incardona's avatar
Pietro Incardona committed
29
cd openfpm_pdata
30
git checkout master
Pietro Incardona's avatar
Pietro Incardona committed
31
cd ..
Pietro Incardona's avatar
Pietro Incardona committed
32
git clone git@git.mpi-cbg.de:openfpm/openfpm_vcluster.git openfpm_vcluster
Pietro Incardona's avatar
Pietro Incardona committed
33
cd openfpm_vcluster
34
git checkout master
Pietro Incardona's avatar
Pietro Incardona committed
35
cd ..
Pietro Incardona's avatar
Pietro Incardona committed
36

Pietro Incardona's avatar
Pietro Incardona committed
37
38
cd "$1/openfpm_io"

Pietro Incardona's avatar
Pietro Incardona committed
39
40
41
#rm -rf $HOME/openfpm_dependencies/openfpm_io/$branch/MPI
#rm -rf $HOME/openfpm_dependencies/openfpm_io/$branch/HDF5
#rm -rf $HOME/openfpm_dependencies/openfpm_io/$branch/BOOST
Pietro Incardona's avatar
Pietro Incardona committed
42

43
if [ x"$hostname" == x"cifarm-centos-node.mpi-cbg.de"  ]; then
Pietro Incardona's avatar
Pietro Incardona committed
44
	source /opt/rh/devtoolset-7/enable
45
        ./install_MPI_mpich.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
Pietro Incardona's avatar
Pietro Incardona committed
46
	export PATH="/opt/bin:$HOME/openfpm_dependencies/openfpm_io/$branch/MPI/bin/:$PATH"
47
48
49
50
        ./install_BOOST.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
	./install_HDF5.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
fi

51
if [ x"$hostname" == x"cifarm-ubuntu-node"  ]; then
52
        ./install_MPI_mpich.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
Pietro Incardona's avatar
Pietro Incardona committed
53
	export PATH="$HOME/openfpm_dependencies/openfpm_io/$branch/MPI/bin/:$PATH"
54
55
56
57
	./install_BOOST.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
	./install_HDF5.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
fi

58
if [ x"$hostname" == x"cifarm-mac-node.mpi-cbg.de"  ]; then
59
60
        export PATH="/usr/local/bin:$PATH"
        ./install_MPI_mpich.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
Pietro Incardona's avatar
Pietro Incardona committed
61
	export PATH="$HOME/openfpm_dependencies/openfpm_io/$branch/MPI/bin/:$PATH"
62
63
64
65
	./install_BOOST.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
	./install_HDF5.sh $HOME/openfpm_dependencies/openfpm_io/$branch/ 4
fi

Pietro Incardona's avatar
Pietro Incardona committed
66
67
# Go in the right branch

Pietro Incardona's avatar
Pietro Incardona committed
68
69
70
echo "Compiling on $2"

sh ./autogen.sh
Pietro Incardona's avatar
Pietro Incardona committed
71
sh ./configure CXX=mpic++ --with-hdf5=$HOME/openfpm_dependencies/openfpm_io/$branch/HDF5 --with-boost=$HOME/openfpm_dependencies/openfpm_io/$branch/BOOST --with-pdata=../../openfpm_pdata/
Pietro Incardona's avatar
Pietro Incardona committed
72

Pietro Incardona's avatar
Pietro Incardona committed
73
make VERBOSE=1 -j 4
Pietro Incardona's avatar
Pietro Incardona committed
74
75