We'll be taking GitLab down for maintenance around 22 in the evening on the 15th of September, so this Sunday. Let us know (tt.mpi-cbg.de) if you experience any issues with it after the maintenance period.

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

Pietro Incardona's avatar
Pietro Incardona committed
3
source $HOME/.bashrc
Pietro Incardona's avatar
Pietro Incardona committed
4

5
# Make a directory in /tmp/openfpm_data
incardon's avatar
incardon committed
6

Pietro Incardona's avatar
Pietro Incardona committed
7
echo "$PATH"
incardon's avatar
incardon committed
8 9 10
echo "Directory: $1"
echo "Machine: $2"

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

15
mkdir openfpm_vcluster/src/config
incardon's avatar
incardon committed
16

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

20
cd "$1/openfpm_vcluster"
incardon's avatar
incardon committed
21

incardon's avatar
incardon committed
22
if [ "$2" == "gin" ]
incardon's avatar
incardon committed
23
then
incardon's avatar
incardon committed
24 25 26
 echo "Compiling on gin\n"
 module load gcc/4.9.2
 module load openmpi/1.8.1
incardon's avatar
incardon committed
27
elif [ "$2" == "wetcluster" ]
incardon's avatar
incardon committed
28 29 30 31 32
then
 echo "Compiling on wetcluster"

## produce the module path

incardon's avatar
incardon committed
33
 export MODULEPATH="/sw/apps/modules/modulefiles:$MODULEPATH"
incardon's avatar
incardon committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47

 script="module load gcc/4.9.2\n 
module load openmpi/1.8.1\n
module load boost/1.54.0\n
compile_options='--with-boost=/sw/apps/boost/1.54.0/'\n
\n
sh ./autogen.sh\n
sh ./configure \"\$compile_options\"  CXX=mpic++\n
make\n
if [ \"\$?\" = "0" ]; then exit 1 ; fi\n
exit(0)\n"

 echo $script | sed -r 's/\\n/\n/g' > compile_script

incardon's avatar
incardon committed
48
 bsub -o output_compile.%J -K -n 1 -J compile sh ./compile_script
incardon's avatar
incardon committed
49

50
## Run on the cluster
51
 bsub -o output_run2.%J -K -n 2 -R "span[hosts=1]" "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np 2 ./src/vcluster"
incardon's avatar
incardon committed
52
 if [ $? -ne 0 ]; then exit 1 ; fi
53
 bsub -o output_run4.%J -K -n 4 -R "span[hosts=1]" "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np 4 ./src/vcluster"
incardon's avatar
incardon committed
54
 if [ $? -ne 0 ]; then exit 1 ; fi
55
 bsub -o output_run8.%J -K -n 8 -R "span[hosts=1]" "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np 8 ./src/vcluster"
incardon's avatar
incardon committed
56
 if [ $? -ne 0 ]; then exit 1 ; fi
57
 bsub -o output_run12.%J -K -n 12 -R "span[hosts=1]" "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np 12 ./src/vcluster"
incardon's avatar
incardon committed
58
 if [ $? -ne 0 ]; then exit 1 ; fi
59 60 61 62 63 64
# bsub -o output_run32.%J -K -n 32 "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np 32 ./src/vcluster"
# if [ $? -ne 0 ]; then exit 1 ; fi
# bsub -o output_run32.%J -K -n 64 "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np 64 ./src/vcluster"
# if [ $? -ne 0 ]; then exit 1 ; fi
# bsub -o output_run32.%J -K -n 128 "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np 128 ./src/vcluster"
# if [ $? -ne 0 ]; then exit 1 ; fi
65 66 67 68
elif [ "$2" == "taurus" ]
then
 echo "Compiling on taurus"

69
 echo "$PATH"
70 71
 module load gcc/5.3.0
 module load boost/1.60.0
Pietro Incardona's avatar
Pietro Incardona committed
72
 module load openmpi/1.10.2-gnu
incardon's avatar
incardon committed
73
 module unload bullxmpi
74

75
 sh ./autogen.sh
Pietro Incardona's avatar
Pietro Incardona committed
76
 sh ./configure --with-boost=/sw/taurus/libraries/boost/1.55.0-gnu4.8  CXX=mpic++
77
 make
78
 if [ $? -ne 0 ]; then exit 1 ; fi
79

80 81
### to exclude --exclude=taurusi[6300-6400],taurusi[5400-5500]

Pietro Incardona's avatar
Pietro Incardona committed
82
 salloc --nodes=1 --ntasks-per-node=24 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 24 src/vcluster --report_level=no"
incardon's avatar
incardon committed
83
 if [ $? -ne 0 ]; then exit 1 ; fi
Pietro Incardona's avatar
Pietro Incardona committed
84
 sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
85
 salloc --nodes=2 --ntasks-per-node=24 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 48 src/vcluster --report_level=no"
incardon's avatar
incardon committed
86
 if [ $? -ne 0 ]; then exit 1 ; fi
Pietro Incardona's avatar
Pietro Incardona committed
87
 sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
88
 salloc --nodes=4 --ntasks-per-node=24 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 96 src/vcluster --report_level=no"
incardon's avatar
incardon committed
89
 if [ $? -ne 0 ]; then exit 1 ; fi
Pietro Incardona's avatar
Pietro Incardona committed
90
 sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
91
 salloc --nodes=8 --ntasks-per-node=24 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 192 src/vcluster --report_level=no"
incardon's avatar
incardon committed
92
 if [ $? -ne 0 ]; then exit 1 ; fi
Pietro Incardona's avatar
Pietro Incardona committed
93
 sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
94
 salloc --nodes=10 --ntasks-per-node=24 --time=00:5:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 240 src/vcluster --report_level=no"
incardon's avatar
incardon committed
95
 if [ $? -ne 0 ]; then exit 1 ; fi
96

incardon's avatar
incardon committed
97 98
else
 echo "Compiling general"
incardon's avatar
incardon committed
99
 sh ./autogen.sh
incardon's avatar
incardon committed
100
 sh ./configure  CXX=mpic++
incardon's avatar
incardon committed
101 102 103
 make

 mpirun -np 2 ./src/vcluster
incardon's avatar
incardon committed
104
 if [ $? -ne 0 ]; then exit 1 ; fi
Pietro Incardona's avatar
Pietro Incardona committed
105 106
 mpirun -np 3 ./src/vcluster
 if [ $? -ne 0 ]; then exit 1 ; fi
incardon's avatar
incardon committed
107
 mpirun -np 4 ./src/vcluster
incardon's avatar
incardon committed
108
 if [ $? -ne 0 ]; then exit 1 ; fi
incardon's avatar
incardon committed
109 110
fi

incardon's avatar
incardon committed
111
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\"  , \"attachments\":[{ \"title\":\"Info:\", \"color\": \"#00FF00\", \"text\":\"$2 completed succeffuly the openfpm_vcluster test \" }] }" https://hooks.slack.com/services/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