build_vcluster.sh 1.04 KB
Newer Older
incardon's avatar
incardon committed
1
2
3
4
#! /bin/bash

# Make a directory in /tmp/OpenFPM_data

incardon's avatar
incardon committed
5
6
7
echo "Directory: $1"
echo "Machine: $2"

incardon's avatar
incardon committed
8
9
10
11
12
13
14
mkdir /tmp/openfpm_vcluster
mv * .[^.]* /tmp/openfpm_vcluster
mv /tmp/openfpm_vcluster OpenFPM_vcluster

mkdir OpenFPM_vcluster/src/config

git clone git@ppmcore.mpi-cbg.de:incardon/openfpm_devices.git OpenFPM_devices
incardon's avatar
incardon committed
15
git clone git@ppmcore.mpi-cbg.de:incardon/openfpm_data.git OpenFPM_data
incardon's avatar
incardon committed
16
17
18

cd "$1/OpenFPM_vcluster"

incardon's avatar
incardon committed
19
20
echo "Compiling on $2"

incardon's avatar
incardon committed
21
if [ "$2" == "gin" ]
incardon's avatar
incardon committed
22
then
incardon's avatar
incardon committed
23
24
25
26
27
 echo "Compiling on gin\n"
 module load gcc/4.9.2
 module load openmpi/1.8.1
fi

incardon's avatar
incardon committed
28
29
30
31
32
if [ "$2" == "wetcluster" ]
then
 echo "Compiling on wetcluster\n"
 module load gcc/4.9.2
 module load openmpi/1.8.1
incardon's avatar
incardon committed
33
 module load boost/1.54.0
incardon's avatar
incardon committed
34
35
36
37
38
39
40
41
 COMPILE_OPTIONS = '--with-boost="/sw/apps/boost/1.54.0/"'
fi

sh ./autogen.sh
sh ./configure $(COMPILE_OPTIONS)  CXX=mpic++
make


incardon's avatar
incardon committed
42
43
44
45
sh ./autogen.sh
sh ./configure CXX=mpic++
make

incardon's avatar
incardon committed
46
47
if [$2 eq "wetcluster"]
then
incardon's avatar
incardon committed
48
49
 bsub -K -n 2 mpirun -np 2 ./src/vcluster
 if [ "$?" = "0" ]; then exit 1 ; fi
incardon's avatar
incardon committed
50
else
incardon's avatar
incardon committed
51
 echo "VCLUSTER\n"
52
53
# mpirun -np 2 ./src/vcluster
# mpirun -np 4 ./src/vcluster
incardon's avatar
incardon committed
54
fi
incardon's avatar
incardon committed
55