Newer
Older
#! /bin/bash
# Make a directory in /tmp/OpenFPM_pdata
workspace=$1
hostname=$(hostname)
target=$3
comp_type=$4
branch=$5
branch=$(git ls-remote --heads origin | grep $(git rev-parse HEAD) | cut -d / -f 3)
fi
echo "make target: $target"
echo "compilation type: $comp_type"
echo "Branch name: $branch"
if [ x"$hostname" == x"cifarm-centos-node.mpi-cbg.de" ]; then
echo "CentOS node"
./install_MPI_mpich.sh $HOME/openfpm_dependencies/openfpm_pdata/$branch/ 4
echo 4 > $HOME/openfpm_dependencies/openfpm_pdata/$branch/MPI/version
fi
if [ x"$hostname" == x"cifarm-ubuntu-node.mpi-cbg.de" ]; then
if [ x"$hostname" == x"cifarm-mac-node.mpi-cbg.de" ]; then
# rm -rf $HOME/openfpm_dependencies/openfpm_pdata/$branch/
if [ x"$comp_type" == x"intel" ]; then
module load parallel_studio_xe/2019u1
mkdir $HOME/openfpm_dependencies_intel/openfpm_pdata/$branch
dependency_dir=/projects/ppm/rundeck/openfpm_dependencies_intel/
else
mkdir $HOME/openfpm_dependencies/openfpm_pdata/$branch
dependency_dir=/projects/ppm/rundeck/openfpm_dependencies/
fi
else
dependency_dir=$HOME/openfpm_dependencies/openfpm_pdata/$branch
mkdir $HOME/openfpm_dependencies/openfpm_pdata/$branch
if [ x"$with_gpu" == x"1" ]; then
gpu_support=-g
else
gpu_support=
fi
#### If you have a dep_dir file change the branch name to the dep_dir
dep_dir=$(cat dep_dir)
if [ x"$dep_dir" != x"" ]; then
mkdir src/config
mkdir openfpm_numerics/src/config
installation_dir="--prefix=$HOME/openfpm_install/$branch"
# force ssh to not use HostKey verification
#echo "StrictHostKeyChecking=no" > $HOME/.ssh/config
#chmod 600 $HOME/.ssh/config
if [ x"$comp_type" == x"full" ]; then
install_options="-s"
elif [ x"$comp_type" == x"intel" ]; then
install_options=" "
install_options="-s -m"
fi
foward_options=
if [ x"$comp_type" == x"se_class" ]; then
foward_options="--enable-se-class1 --with-action-on-error=STOP_ON_ERROR"
fi
echo "Installing with: ./install $gpu_support -i $dependency_dir $install_options -c \"$installation_dir $foward_options \" "
./install $gpu_support -i $dependency_dir $install_options -c "$installation_dir $foward_options "
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$hostname failed to complete the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
# Check of we have to do a make install
if [ x"$comp_type" == x"full" ]; then
make install
else
mv $HOME/openfpm_vars $HOME/openfpm_vars_$branch
source $HOME/openfpm_vars_$branch
make VERBOSE=1 -j 8
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$hostname failed to complete the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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