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

Fixing installation

parent 6a956879
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,9 @@ if [ $sq -eq 0 ]; then
possible_solutions "${commands[@]}"
fi
echo -e "\033[1mHow many core you want to use to install the dependencies?\033[0m"
read ncore
echo -e "Installing requirements into: $i_dir "
##
......@@ -135,22 +138,38 @@ echo -e "Installing requirements into: $i_dir "
### Installing PETSC
if [ ! -d "$i_dir/PETSC" -o ! -d "$i_dir/EIGEN" ]; then
echo -e "\033[1;34m OpenFPM Numerics \033[0m"
echo -e "\033[1mOpenfpm Numerics\033[0m is in Beta production. It use optionally the following\033[1m linear algebra packages (TRILINOS,SUPERLU_DIST,MUMPS,HYPRE,SCALAPACK,SUITESPARSE,OPENBLAS,EIGEN,PETSC) \033[0m. \033[1mThe installation is automated but can take long time \033[1m (i7-3612QM 4 core 90 minutes) \033[0m. In case you decide to not install the linear algebra, openfpm numeric will try anyway to search for linear algebra packages"
echo ""
echo -e "\033[1mHow many core you want to use to install the linear algebra package?\033[0m(0=no linear algebra installation)"
read lin_alg_ncore
echo -e "\033[1;34m Optional packages \033[0m"
echo -e "\033[1mDo you want to install linear algebra packages ?(y/n)\033[0m"
echo "Installation can take long time (90 minutes on i7-3612QM 4 cores)"
read inst_lin_alg
# if [ ! x"$choose" == x"0" ]; then
# ./script/install_PETSC.sh $i_dir $choose
# configure_options="$configure_options --with-PETSC=$i_dir/PETSC "
# fi
elif [ -d "$i_dir/PETSC" ]; then
fi
if [ -d "$i_dir/PETSC" ]; then
configure_options="$configure_options --with-petsc=$i_dir/PETSC "
elif [ -d "$i_dir/EIGEN" ]; then
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN --with-suitesparse=$i_dir/SUITESPARSE --with-blas=\"$i_dir/OPENBLAS/lib -lopenblas\" "
fi
if [ -d "$i_dir/EIGEN" ]; then
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN --with-suitesparse=$i_dir/SUITESPARSE "
configure_blas_option=" --with-blas=\"$i_dir/OPENBLAS/lib -lopenblas\" "
fi
if [ -d "$i_dir/MPI" ]; then
configure_options="$configure_options CXX=mpic++ "
fi
if [ -d "$i_dir/METIS" ]; then
configure_options=" $configure_options --with-metis=$i_dir/METIS "
fi
if [ -d "$i_dir/BOOST" ]; then
configure_options=" $configure_options --with-boost=$i_dir/BOOST "
fi
if [ -d "$i_dir/PARMETIS" ]; then
configure_options=" $configure_options --with-parmetis=$i_dir/PARMETIS "
fi
if [ -d "$i_dir/HDF5" ]; then
configure_options=" $configure_options --with-hdf5=$i_dir/HDF5/bin/h5pcc "
fi
### MPI
......@@ -167,9 +186,9 @@ set_mpi $i_dir
### METIS and ParMETIS must be installed independently from sistem wide installation
./script/install_Parmetis.sh $i_dir $compiler_gcc $compiler_gpp
./script/install_Parmetis.sh $i_dir $ncore
configure_options=" $configure_options --with-parmetis=$i_dir/PARMETIS "
./script/install_Metis.sh $i_dir $compiler_gcc $compiler_gpp
./script/install_Metis.sh $i_dir $compiler_gcc $compiler_gpp $ncore
configure_options=" $configure_options --with-metis=$i_dir/METIS "
MPI_installed=0
......@@ -189,7 +208,7 @@ HDF5_System_prv=1
conf_err=1
if [ $install_req -eq 0 ]; then
./configure $options $configure_options
./configure $options $configure_options "$configure_blas_option"
else
while [ $conf_err -ne 0 ]
do
......@@ -205,7 +224,7 @@ else
echo "Error the installation of MPI failed"
exit 1
fi
./script/install_MPI.sh $i_dir $compiler_opt
./script/install_MPI.sh $i_dir $ncore
MPI_installed=1
export PATH="$PATH:$i_dir/MPI/bin"
configure_options="$configure_options CXX=mpic++ "
......@@ -224,7 +243,7 @@ else
echo "Error the installation of Boost failed"
exit 1
fi
./script/install_BOOST.sh $i_dir $compiler_opt
./script/install_BOOST.sh $i_dir $ncore
BOOST_installed=1
configure_options=" $configure_options --with-boost=$i_dir/BOOST "
elif [ $conf_err -eq 208 ]; then
......@@ -233,7 +252,7 @@ else
echo "Error the installation of ParMETIS failed"
exit 1
fi
./script/install_Parmetis.sh $i_dir $compiler_gcc $compiler_gpp
./script/install_Parmetis.sh $i_dir $ncore
PARMETIS_installed=1
configure_options=" $configure_options --with-parmetis=$i_dir/PARMETIS "
elif [ $conf_err -eq 207 ]; then
......@@ -242,7 +261,7 @@ else
echo "Error the installation of HDF5 failed"
exit 1
fi
./script/install_HDF5.sh $i_dir $compiler_opt
./script/install_HDF5.sh $i_dir $ncore
configure_options=" $configure_options --with-hdf5=$i_dir/HDF5/bin/h5pcc "
HDF5_installed=1
elif [ $conf_err -ne 0 ]; then
......@@ -251,12 +270,13 @@ else
fi
done
if [ ! x"$lin_alg_ncore" == x"0" ]; then
./script/install_EIGEN.sh $i_dir $lin_alg_ncore
if [ ! x"$inst_lin_alg" == x"y" ]; then
./script/install_EIGEN.sh $i_dir $ncore
if [ $? -eq 0 ]; then
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN --with-suitesparse=$i_dir/SUITESPARSE --with-blas=\"$i_dir/OPENBLAS/lib -lopenblas\" "
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN --with-suitesparse=$i_dir/SUITESPARSE "
configure_blas_option=" --with-blas=\"$i_dir/OPENBLAS/lib -lopenblas\" "
fi
./script/install_PETSC.sh $i_dir $lin_alg_ncore
./script/install_PETSC.sh $i_dir $ncore
if [ $? -eq 0 ]; then
configure_options=" $configure_options --with-petsc=$i_dir/PETSC "
fi
......
......@@ -45,9 +45,11 @@ AC_DEFUN([IMMDX_LIB_PARMETIS], [
old_CC=$CC
old_CFLAGS=$CFLAGS
old_LDFLAGS=$LDFLAGS
old_LIBS=$LIBS
CFLAGS="-I$with_parmetis/include -I$with_metis/include"
LDFLAGS="-L$with_parmetis/lib -L$with_metis/lib"
CC=$CXX
LIBS="-lmetis"
AC_LANG_SAVE
AC_LANG_C
......@@ -62,6 +64,7 @@ AC_DEFUN([IMMDX_LIB_PARMETIS], [
CFLAGS=$old_CFLAGS
LDFLAGS=$old_LDFLAGS
CC=$old_CC
LIBS=$old_LIBS
AC_MSG_CHECKING(PARMETIS in $with_parmetis)
if test "$parmetis_lib" = "yes" -a "$parmetis_h" = "yes" ; then
......
......@@ -12,6 +12,6 @@ tar -xvf boost_1_60_0.tar.bz2
cd boost_1_60_0
./bootstrap.sh
mkdir $1/BOOST
./b2 -j 4 install --prefix=$1/BOOST
./b2 -j $2 install --prefix=$1/BOOST
rm -rf boost_1_60_0
......@@ -11,6 +11,6 @@ wget http://ppmcore.mpi-cbg.de/upload/hdf5-1.8.16.tar.bz2
tar -xf hdf5-1.8.16.tar.bz2
cd hdf5-1.8.16
CC=mpicc ./configure --enable-parallel --prefix=$1/HDF5
make -j 4
make -j $2
mkdir $1/HDF5
make install
......@@ -26,7 +26,7 @@ cd openmpi-1.10.2
#
./configure --prefix=$1/MPI --enable-mpi-fortran=yes
make -j 4
make -j $2
make install
# Mark the installation
......
......@@ -25,7 +25,7 @@ else
echo "cmake ../../. -DSHARED=1 -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS"
cmake ../../. -DSHARED=1 -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS
fi
make -j 4
make -j $4
mkdir $1/METIS
make install
......
......@@ -14,7 +14,7 @@ wget http://ppmcore.mpi-cbg.de/upload/parmetis-4.0.3.tar.gz
tar -xf parmetis-4.0.3.tar.gz
cd parmetis-4.0.3
make config prefix=$1/PARMETIS
make -j 4
make -j $2
if [ $? -ne 0 ]; then
echo "PARMETIS error installing"
exit 0
......
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