Skip to content
Snippets Groups Projects
Commit 1c0543ed authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Merge branch 'master' of ppmcore.mpi-cbg.de:incardon/openfpm_pdata

parents e4245cb6 8b369877
No related branches found
No related tags found
No related merge requests found
#! /bin/bash
##
source script/discover_os
source script/show_solutions
discover_os
## Check and try to install the prerequisites
......@@ -24,7 +27,39 @@ if [ $? -ne 0 ]; then
exit 1
fi
## Take all the options with the exception of --enable-install-req
## check for an install dir file or option
i_dir=" "
if [ -f install_deps_dir ]; then
i_dir=$(install_deps_dir)
fi
getopts i: i_dir_opt
case $i_dir_opt in
i)
i_dir="$OPTARG"
;;
\?)
;;
esac
if [ x"$i_dir" == x" " ]; then
i_dir="$HOME"
fi
echo -e "\033[1;34;5mDEPENCENCIES INSTALLATION DIR \033[0m"
echo -e "Every required dependencies if needed will be installed into: \033[1;34;5m$i_dir\033[0m"
echo -e "if you want to install somewhere else do ./install -i /somewhere/else"
commands[0]="Continue"
possible_solutions "${commands[@]}"
echo -e "Installing requirements into: $i_dir "
##
## Take all the options with the exception of -d or -i
install_req=1
configure_options=""
......@@ -32,7 +67,7 @@ configure_options=""
for var in $@
do
echo $var
if [ x"$var" != x"--disable-install-req" ] ; then
if [ x"$var" != x"-d" ] ; then
configure_options="$configure_options $var"
else
install_req=0
......@@ -72,7 +107,7 @@ else
echo "Error the installation of MPI failed"
exit 1
fi
./script/install_MPI.sh
./script/install_MPI.sh $i_dir
MPI_installed=1
export PATH="$PATH:${HOME}/MPI/bin"
echo $PATH
......@@ -83,7 +118,7 @@ else
echo "Error the installation of METIS failed"
exit 1
fi
./script/install_Metis.sh
./script/install_Metis.sh $i_dir
METIS_installed=1
configure_options=" $configure_options --with-metis=${HOME}/METIS "
elif [ $conf_err -eq 202 ]; then
......@@ -92,7 +127,7 @@ else
echo "Error the installation of Boost failed"
exit 1
fi
./script/install_BOOST.sh
./script/install_BOOST.sh $i_dir
BOOST_installed=1
configure_options=" $configure_options --with-boost=${HOME}/BOOST "
elif [ $conf_err -ne 0 ]; then
......
......@@ -57,8 +57,12 @@ AS_IF([test "x$NVCC_EXIST" = "xno"],[],[
# If $build_cpu contains "_64", append "64" to CUDA_LIBS
AS_IF([echo $build_cpu | grep -q "_64"],
[
AS_IF([ ! test -d {CUDA_LIBS}lib64 ], [ CUDA_LIBS+="64" ])
AS_IF([ ! command -v bumblebee >/dev/null ], [ CUDA_LIBS+=" -L/usr/lib64/nvidia-bumblebee/ " ])
AS_IF([ test -d {CUDA_LIBS}lib64 ], [ CUDA_LIBS+="64" ])
AS_IF([ command -v bumblebee >/dev/null ], [ CUDA_LIBS+=" -L/usr/lib64/nvidia-bumblebee/ " ])
AS_IF([ test -d /usr/local/cuda/lib64 ], [ CUDA_LIBS+=" -L/usr/local/cuda/lib64 " ],
[
AS_IF([ test -d /usr/local/cuda/lib ],[ CUDA_LIBS+=" -L/usr/local/cuda/lib " ])
])
])
# Append " -lcuda -lcudart" to CUDA_LIBS
......
#!/bin/bash
# check if the directory ${HOME}/MPI exist
# check if the directory $1/MPI exist
if [ -d "${HOME}/BOOST" ]; then
if [ -d "$1/BOOST" ]; then
echo "BOOST already installed"
exit 0
fi
......@@ -11,6 +11,6 @@ wget http://ppmcore.mpi-cbg.de/upload/boost_1_58_0.tar.bz2
tar -xvf boost_1_58_0.tar.bz2
cd boost_1_58_0
./bootstrap.sh
mkdir ${HOME}/BOOST
./b2 -j 4 install --prefix=$HOME/BOOST
mkdir $1/BOOST
./b2 -j 4 install --prefix=$1/BOOST
#!/bin/bash
# check if the directory ${HOME}/MPI exist
# check if the directory $1/MPI exist
if [ -d "${HOME}/MPI" ]; then
if [ -d "$1/MPI" ]; then
echo "MPI already installed"
exit 0
fi
......@@ -10,7 +10,7 @@ fi
wget http://www.open-mpi.de/software/ompi/v1.8/downloads/openmpi-1.8.7.tar.bz2
tar -xvf openmpi-1.8.7.tar.bz2
cd openmpi-1.8.7
sh ./configure --prefix=${HOME}/MPI --enable-opal-multi-threads --enable-mpi-f90
sh ./configure --prefix=$1/MPI --enable-opal-multi-threads --enable-mpi-f90
make -j 4
mkdir ${HOME}/MPI
mkdir $1/MPI
make install
#! /bin/bash
# check if the directory ${HOME}/METIS exist
# check if the directory $1/METIS exist
if [ -d "${HOME}/METIS" ]; then
if [ -d "$1/METIS" ]; then
echo "METIS already installed"
exit 0
fi
......@@ -10,8 +10,8 @@ fi
wget http://ppmcore.mpi-cbg.de/upload/metis-5.1.0.tar.gz
tar -xf metis-5.1.0.tar.gz
cd metis-5.1.0
make config shared=1 prefix=${HOME}/METIS
make config shared=1 prefix=$1/METIS
make -j 4
mkdir ${HOME}/METIS
mkdir $1/METIS
make install
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment