Commit 72ff931d authored by Yaser Afshar's avatar Yaser Afshar

minor correction on the script - now PETSC installation works correctly

parent c6c13f43
......@@ -10,8 +10,9 @@ source script/conf_PETSC
source script/update_openfpm
### switch to the branch
b_switch=$(cat switch_branch)
b_switch=`git rev-parse --abbrev-ref HEAD`
b_switch=
#b_switch=$(cat switch_branch)
if [ x"$b_switch" != x"" ]; then
git checkout $b_switch
echo -e "Please relaunch ./install ..."
......@@ -52,23 +53,23 @@ while getopts di:smhc:nu FLAG; do
echo "Fowarding options $OPTARG to configure script"
configure_options=$OPTARG
;;
m)
echo "Skip to make the testing"
nomake=1
;;
m)
echo "Skip to make the testing"
nomake=1
;;
u)
echo "Updating openfpm"
update_openfpm=1
;;
n)
echo "Upgrading openfpm"
echo "Upgrading openfpm"
upgrade_openfpm=1
;;
h) #show help
HELP
;;
\?) #unrecognized option - are fowarded to configure
;;
HELP
;;
\?) #unrecognized option - are fowarded to configure
;;
esac
done
......@@ -101,13 +102,12 @@ if [ $upgrade_openfpm -eq 1 ]; then
exit 0
fi
remove_old $i_dir
remove_old $i_dir $configure_options
## Check and try to install the prerequisites
pre_req
## clone the dependencies
git submodule init
if [ $? -ne 0 ]; then
echo -e "Configure\033[91;5;1m FAILED \033[0m"
......@@ -121,7 +121,6 @@ if [ $? -ne 0 ]; then
fi
# Create config directory in each submodule
cd openfpm_data
if [ ! -d src/config ]; then
mkdir src/config
......@@ -166,6 +165,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
## check for options
echo -e "\033[1;34;5mDEPENCENCIES INSTALLATION DIR \033[0m"
......@@ -177,7 +177,7 @@ if [ x"$configure_options" == x"" ]; then
fi
if [ $sq -eq 0 ]; then
unset commands
commands[0]="Continue"
commands[0]="continue"
possible_solutions "${commands[@]}"
fi
......@@ -284,7 +284,7 @@ else
./configure $options $configure_options "$configure_blas_option"
conf_err=$?
echo "Configure script terminated with $conf_err"
echo "Configure script terminated with $conf_err"
## if MPI or METIS installation required install it
if [ $conf_err -eq 200 ]; then
......@@ -321,7 +321,7 @@ else
fi
BOOST_installed=1
configure_options=" $configure_options --with-boost=$i_dir/BOOST "
elif [ $conf_err -eq 208 ]; then
elif [ $conf_err -eq 208 ]; then
echo "ParMetis not found try to install"
if [ $PARMETIS_installed -eq 1 ]; then
echo "Error the installation of ParMETIS failed"
......@@ -334,7 +334,7 @@ else
echo "HDF5 not found try to install"
if [ $HDF5_installed -eq 1 ]; then
echo "Error the installation of HDF5 failed"
exit 1
exit 1
fi
./script/install_HDF5.sh $i_dir $ncore
configure_options=" $configure_options --with-hdf5=$i_dir/HDF5/bin/h5pcc "
......@@ -359,11 +359,10 @@ else
./script/install_PETSC.sh $i_dir $ncore $CC $CXX $F77 $FC
fi
### collect PETSC configuration options
conf_PETSC
### collect PETSC configuration options
conf_PETSC
./configure $options $configure_options "$configure_blas_option"
fi
### Create example.mk
......
......@@ -2,47 +2,47 @@
function conf_PETSC()
{
if [ -d "$i_dir/PETSC" ]; then
configure_options="$configure_options --with-petsc=$i_dir/PETSC "
lin_alg_dir="$lin_alg_dir -L$i_dir/PETSC/lib"
lin_alg_lib="$lin_alg_lib -lpetsc"
lin_alg_inc="$lin_alg_inc -I$i_dir/PETSC/include"
fi
if [ -d "$i_dir/HYPRE" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/HYPRE/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/HYPRE/include"
fi
if [ -d "$i_dir/MUMPS" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/MUMPS/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/MUMPS/include"
fi
if [ -d "$i_dir/OPENBLAS" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/OPENBLAS/lib"
lin_alg_lib="$lin_alg_lib -lopenblas"
lin_alg_inc="$lin_alg_inc -I$i_dir/OPENBLAS/include"
configure_blas_option="--with-blas=-L$i_dir/OPENBLAS/lib -lopenblas"
fi
if [ -d "$i_dir/SCALAPACK" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/SCALAPACK/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/SCALAPACK/include"
fi
if [ -d "$i_dir/SUPERLU_DIST" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/SUPERLU_DIST/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/SUPERLU_DIST/include"
fi
if [ -d "$i_dir/TRILINOS" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/TRILINOS/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/TRILINOS/include"
fi
if [ -d "$i_dir/SUITESPARSE" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/SUITESPARSE/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/SUITESPARSE/include"
lin_alg_lib="$lin_alg_lib -lumfpack -lamd -lbtf -lcamd -lccolamd -lcholmod -lcolamd -lcxsparse -lklu -ldl -lrbio -lspqr -lsuitesparseconfig"
configure_options="$configure_options --with-suitesparse=$i_dir/SUITESPARSE "
fi
if [ -d "$i_dir/EIGEN" ]; then
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN "
lin_alg_inc="$lin_alg_inc -I$i_dir/EIGEN"
fi
if [ -d "$i_dir/PETSC" ]; then
configure_options="$configure_options --with-petsc=$i_dir/PETSC "
lin_alg_dir="$lin_alg_dir -L$i_dir/PETSC/lib"
lin_alg_lib="$lin_alg_lib -lpetsc"
lin_alg_inc="$lin_alg_inc -I$i_dir/PETSC/include"
fi
if [ -d "$i_dir/HYPRE" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/HYPRE/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/HYPRE/include"
fi
if [ -d "$i_dir/MUMPS" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/MUMPS/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/MUMPS/include"
fi
if [ -d "$i_dir/OPENBLAS" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/OPENBLAS/lib"
lin_alg_lib="$lin_alg_lib -lopenblas"
lin_alg_inc="$lin_alg_inc -I$i_dir/OPENBLAS/include"
configure_blas_option="--with-blas=-L$i_dir/OPENBLAS/lib -lopenblas"
fi
if [ -d "$i_dir/SCALAPACK" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/SCALAPACK/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/SCALAPACK/include"
fi
if [ -d "$i_dir/SUPERLU_DIST" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/SUPERLU_DIST/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/SUPERLU_DIST/include"
fi
if [ -d "$i_dir/TRILINOS" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/TRILINOS/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/TRILINOS/include"
fi
if [ -d "$i_dir/SUITESPARSE" ]; then
lin_alg_dir="$lin_alg_dir -L$i_dir/SUITESPARSE/lib"
lin_alg_inc="$lin_alg_inc -I$i_dir/SUITESPARSE/include"
lin_alg_lib="$lin_alg_lib -lumfpack -lamd -lbtf -lcamd -lccolamd -lcholmod -lcolamd -lcxsparse -lklu -ldl -lrbio -lspqr -lsuitesparseconfig"
configure_options="$configure_options --with-suitesparse=$i_dir/SUITESPARSE "
fi
if [ -d "$i_dir/EIGEN" ]; then
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN "
lin_alg_inc="$lin_alg_inc -I$i_dir/EIGEN"
fi
}
#! /bin/bash
function haveProg() {
[ -x "$(command -v $1)" ]
}
function gpp_clang()
{
if [ x"$dgc_compiler" == x"g++" ]; then
......@@ -15,20 +19,17 @@ function gpp_clang()
fi
}
function detect_compiler()
{
gpp_found=0
icpc_found=0
dgc_ret=0
# First we try to understand if g++ command line is linked to clang
g++ --version | grep "Apple LLVM"
if [ $? == 0 ]; then
echo "Apple LLVM based g++"
if haveProg g++; then
g++ --version | grep "Apple LLVM" >/dev/null 2>&1
if [ $? == 0 ]; then
echo "Apple LLVM based g++"
# we try the detect the version
......@@ -65,13 +66,13 @@ function detect_compiler()
dgc_ret=1
gpp_found=1
fi
else
dgc_ret=2
else
dgc_ret=2
fi
fi
fi
g++ --version | grep g++
if [ $? == 0 -a x"g++" == x"g++" ]; then
g++ --version | grep "g++" > /dev/null 2>&1
if [ $? == 0 ]; then
dgc_major=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
......@@ -104,10 +105,10 @@ function detect_compiler()
dgc_ret=0
gpp_found=0
fi
fi
fi
g++ --version | grep g++
if [ $? == 0 -a x"g++" == x"clang" ]; then
g++ --version | grep "clang" > /dev/null 2>&1
if [ $? == 0 ]; then
dgc_major=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
......@@ -136,10 +137,12 @@ function detect_compiler()
dgc_ret=0
gpp_found=0
fi
fi
fi
icpc --version | grep icpc
if [ $? == 0 -a x"icpc" == x"icpc" ]; then
if haveProg icpc; then
icpc --version | grep icpc > /dev/null 2>&1
if [ $? == 0 ]; then
dgc_major=$(icpc --version | grep icpc | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$(icpc --version | grep icpc | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$(icpc --version | grep icpc | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
......@@ -164,10 +167,10 @@ function detect_compiler()
dgc_ret=1
icpc_found=1
fi
fi
fi
### If we detect more than one valid compiler ask to choose
if [ $icpc_found -eq 1 -a $gpp_found -eq 1 ]; then
echo "Two different valid compilers has been found please choose one"
commands[0]="icpc"
......
#! /bin/bash
function haveProg() {
[ -x "$(command -v $1)" ]
}
function discover_package_manager() {
if [ x"$1" = x"osx" ]; then
command -v brew >/dev/null
if [ $? -eq 0 ]; then
discover_package_manager_ret="brew"
brew_idir=$(brew --prefix)
brew_path=$(which brew)
brew_user=$(stat -f '%Su' $brew_path)
if [ x$"brew_user" == root ]; then
discover_package_ret="sudo brew"
return
else
if [ ! -w $brew_idir ]; then
echo -e "\033[43;30;1;5mWARNING: \033[0m $brew_idir is not writtable, brew require that $brew_idir is writtable and $brew_idir/bin is in your PATH, otherwise it will be not possible to install with brew"
commands[0]="sudo chown -R $USER $brew_idir && chmod -R u+w $brew_idir"
possible_solutions "${commands[@]}"
if [ x"$1" == x"osx" ]; then
if haveProg brew; then
discover_package_manager_ret="brew"
brew_idir=$(brew --prefix)
brew_path=$(which brew)
brew_user=$(stat -f '%Su' $brew_path)
if [ x$"brew_user" == root ]; then
discover_package_ret="sudo brew"
echo 'Package Manager: '"$discover_package_manager_ret"
return
else
if [ ! -w $brew_idir ]; then
echo -e "\033[43;30;1;5mWARNING: \033[0m $brew_idir is not writtable, brew require that $brew_idir is writtable and $brew_idir/bin is in your PATH, otherwise it will be not possible to install with brew"
commands[0]="sudo chown -R $USER $brew_idir && chmod -R u+w $brew_idir"
possible_solutions "${commands[@]}"
fi
fi
fi
if [ ! -w ]; then
echo -e "\033[43,33;5mWARNING: \033[0m $brew_idir is not writtable, brew require that $brew_idir is writtable and $brew_idir/bin is in your PATH, otherwise it will be not possible to install with brew"
sleep 10
fi
return
if [ ! -w ]; then
echo -e "\033[43,33;5mWARNING: \033[0m $brew_idir is not writtable, brew require that $brew_idir is writtable and $brew_idir/bin is in your PATH, otherwise it will be not possible to install with brew"
sleep 10
fi
echo echo 'Package Manager: '"$discover_package_manager_ret"
return
fi
command -v port >/dev/null
if [ $? -eq 0 ]; then
discover_package_manager_ret="sudo port"
return
if haveProg port; then
discover_package_manager_ret="sudo port"
echo 'Package Manager: '"$discover_package_manager_ret"
return
else
discover_package_manager_ret=""
return
discover_package_manager_ret=""
echo 'Package Manager: '"$discover_package_manager_ret"
return
fi
elif [ x"$1" = x"linux" ]; then
command -v yum >/dev/null
if [ $? -eq 0 ]; then
discover_package_manager_ret="yum"
return
elif [ x"$1" == x"linux" ]; then
if haveProg yum; then
discover_package_manager_ret="yum"
echo 'Package Manager: '"$discover_package_manager_ret"
return
fi
command -v apt-get >/dev/null
if [ $? -eq 0 ]; then
discover_package_manager_ret="apt-get"
return
if haveProg apt-get; then
discover_package_manager_ret="apt-get"
echo 'Package Manager: '"$discover_package_manager_ret"
return
fi
command -v zypper >/dev/null
if [ $? -eq 0 ]; then
discover_package_manager_ret="zypper"
return
if haveProg zypper; then
discover_package_manager_ret="zypper"
echo 'Package Manager: '"$discover_package_manager_ret"
return
else
discover_package_manager_ret=""
return
discover_package_manager_ret=""
echo 'Package Manager: '"$discover_package_manager_ret"
return
fi
fi
fi
}
echo "$discover_package_manager_ret"
......@@ -3,7 +3,7 @@
# check if the directory $1/EIGEN exist
if [ -d "$1/EIGEN" ]; then
echo "EIGEN already installed"
echo "EIGEN is already installed"
exit 0
fi
......
......@@ -3,14 +3,39 @@
# check if the directory $1/HDF5 exist
if [ -d "$1/HDF5" ]; then
echo "HDF5 already installed"
echo "HDF5 is already installed"
exit 0
fi
if [ ! -d "$1/ZLIB" ]; then
rm zlib1211.zip
rm -rf zlib-1.2.11
wget https://zlib.net/zlib1211.zip
if [ $? -ne 0 ]; then
echo -e "\033[91;5;1m FAILED! Installation requires an Internet connection \033[0m"
exit 1
fi
unzip zlib1211.zip
cd zlib-1.2.11
CC=mpicc ./configure --prefix=$1/ZLIB
make -j $2
if [ $? -eq 0 ]; then
make check install
else
echo -e "\033[91;5;1m ZLIB Installation FAILED \033[0m"
exit 1
fi
else
echo "ZLIB is already installed"
fi
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
CC=mpicc ./configure --with-zlib=$1/ZLIB --enable-parallel --prefix=$1/HDF5
make -j $2
mkdir $1/HDF5
make install
#!/bin/bash
#!/bin/bash
# check if the directory $1/MPI exist
......
......@@ -3,7 +3,7 @@
# check if the directory $1/METIS exist
if [ -d "$1/METIS" ]; then
echo "METIS already installed"
echo "METIS is already installed"
exit 0
fi
......
......@@ -3,7 +3,7 @@
# check if the directory $1/OPENBLAS exist
if [ -d "$1/OPENBLAS" ]; then
echo "OPENBLAS already installed"
echo "OPENBLAS is already installed"
exit 0
fi
......
......@@ -8,7 +8,7 @@ F77=$5
FC=$6
if [ -d "$1/PETSC" ]; then
echo "PETSC already installed"
echo "PETSC is already installed"
exit 0
fi
......@@ -45,7 +45,7 @@ configure_options_hypre=""
if [ -d "$1/PARMETIS" ]; then
configure_options="$configure_options --with-parmetis=yes --with-parmetis-dir=$1/PARMETIS/ "
configure_options="$configure_options --with-parmetis=yes --with-parmetis-dir=$1/PARMETIS "
configure_options_superlu="-DTPL_PARMETIS_INCLUDE_DIRS=$1/PARMETIS/include;$1/METIS/include -DTPL_PARMETIS_LIBRARIES=$1/PARMETIS/lib/libparmetis.a;$1/METIS/lib/libmetis.so $configure_options_superlu"
fi
......@@ -53,11 +53,7 @@ if [ -d "$1/METIS" ]; then
configure_options="$configure_options --with-metis=yes --with-metis-dir=$1/METIS "
fi
#if [ -d "$1/HDF5" ]; then
# configure_options="$configure_options --with-hdf5=yes --with-hdf5-dir=$1/HDF5 "
#fi
if [ -d "$1/BOOST" ]; then
if [ -d "$1/BOOST" ]; then
configure_options="$configure_options --with-boost=yes --with-boost-dir=$1/BOOST "
configure_trilinos_options="$configure_trilinos_options -D TPL_ENABLE_Boost=ON -D TPL_ENABLE_BoostLib=ON -D Boost_INCLUDE_DIRS=$1/BOOST/include -D BoostLib_LIBRARY_DIRS=$1/BOOST/lib -D BoostLib_INCLUDE_DIRS=$1/BOOST/include"
fi
......@@ -99,12 +95,48 @@ else
configure_options="$configure_options --with-suitesparse=yes --with-suitesparse-dir=$1/SUITESPARSE "
fi
# Install NETCFD
if [ -d "$1/NETCDF" ]; then
echo "NETCDF is already installed"
configure_options="$configure_options --with-netcdf=yes -with-netcdf-dir=$1/NETCDF --with-hdf5=yes --with-hdf5-dir=$1/HDF5 "
else
if [ -d "$1/HDF5" ]; then
configure_options="$configure_options --with-hdf5=yes --with-hdf5-dir=$1/HDF5 "
else
./script/install_HDF5.sh $1 $2
if [ $? -eq 0 ]; then
configure_options="$configure_options --with-hdf5=yes --with-hdf5-dir=$1/HDF5 "
fi
fi
rm netcdf-4.4.1.1.tar.gz
rm -rf netcdf-4.4.1.1
wget http://ppmcore.mpi-cbg.de/upload/netcdf-4.4.1.1.tar.gz
if [ $? -ne 0 ]; then
echo -e "\033[91;5;1m FAILED! Installation requires an Internet connection \033[0m"
exit 1
fi
tar -xf netcdf-4.4.1.1.tar.gz
cd netcdf-4.4.1.1
./configure CC=mpicc CPPFLAGS="-I$1/HDF5/include -I$1/ZLIB/include " LDFLAGS="-L$1/HDF5/lib -L$1/ZLIB/lib" --disable-dap --disable-shared --prefix=$1/NETCDF
make -j $2
if [ $? -eq 0 ]; then
make install
configure_options="$configure_options --with-netcdf=yes -with-netcdf-dir=$1/NETCDF "
else
echo -e "\033[91;5;1m FAILED! NETCDF Installation \033[0m"
exit 1
fi
fi
if [ ! -d "$1/TRILINOS" ]; then
rm trilinos-12.10.1-Source.tar.bz2
rm -rf trilinos-12.10.1-Source
wget http://ppmcore.mpi-cbg.de/upload/trilinos-12.10.1-Source.tar.bz2
if [ $? -ne 0 ]; then
echo -e "\033[91;5;1m FAILED Installation require an Internet connection \033[0m"
echo -e "\033[91;5;1m FAILED! Installation requires an Internet connection \033[0m"
exit 1
fi
tar -xf trilinos-12.10.1-Source.tar.bz2
......@@ -117,7 +149,7 @@ if [ ! -d "$1/TRILINOS" ]; then
if [ x"$CXX" == x"clang++" ]; then
conf_trl_openmp="-D Trilinos_ENABLE_OpenMP=OFF"
elif [ x"$CXX" == x"icpc" ]; then
configure_trilinos_options="$configure_trilinos_options -D Trilinos_ENABLE_Xpetra=OFF -D Trilinos_ENABLE_Amesos2=OFF -D Trilinos_ENABLE_Ifpack2=OFF -D Trilinos_ENABLE_Teko=OFF "
else
conf_trl_openmp="-D Trilinos_ENABLE_OpenMP=ON"
......@@ -134,7 +166,7 @@ if [ ! -d "$1/TRILINOS" ]; then
configure_options="$configure_options --with-trilinos=yes -with-trilinos-dir=$1/TRILINOS"
fi
else
echo "Trilinos already installed"
echo "Trilinos is already installed"
configure_options="$configure_options --with-trilinos=yes -with-trilinos-dir=$1/TRILINOS"
fi
......@@ -145,7 +177,7 @@ if [ ! -d "$1/SCALAPACK" ]; then
rm -rf scalapack-2.0.2
wget http://ppmcore.mpi-cbg.de/upload/scalapack-2.0.2.tgz
if [ $? -ne 0 ]; then
echo -e "\033[91;5;1m FAILED Installation require an Internet connection \033[0m"
echo -e "\033[91;5;1m FAILED! Installation requires an Internet connection \033[0m"
exit 1
fi
tar -xf scalapack-2.0.2.tgz
......@@ -160,26 +192,24 @@ if [ ! -d "$1/SCALAPACK" ]; then
configure_options="$configure_options --with-scalapack=yes -with-scalapack-dir=$1/SCALAPACK"
fi
else
echo "Scalapack already installed"
echo "Scalapack is already installed"
configure_options="$configure_options --with-scalapack=yes -with-scalapack-dir=$1/SCALAPACK"
fi
### MUMPS installation
if [ x"$CXX" != x"icpc" ]; then
if [ ! -d "$1/MUMPS" ]; then
rm MUMPS_5.0.1.tar.gz
rm -rf MUMPS_5.0.1
wget http://ppmcore.mpi-cbg.de/upload/MUMPS_5.0.1.tar.gz
if [ $? -ne 0 ]; then
echo -e "\033[91;5;1m FAILED Installation require an Internet connection \033[0m"
echo -e "\033[91;5;1m FAILED! Installation requires an Internet connection \033[0m"
exit 1
fi
tar -xf MUMPS_5.0.1.tar.gz
cd MUMPS_5.0.1
cp Make.inc/Makefile.inc.generic Makefile.inc
# Installation for linux
$sed_command -i "/CC\s\+=\scc/c\CC = mpicc" Makefile.inc
......@@ -199,7 +229,6 @@ if [ x"$CXX" != x"icpc" ]; then
$sed_command -i "/LIBPAR\s\+=\s\$(SCALAP)\s\-L\/usr\/lib\s\-lmpi/c\LIBPAR = \$(SCALAP)" Makefile.inc
make -j $2
if [ $? -eq 0 ]; then
## Copy LIB and include in the target directory
......@@ -207,14 +236,14 @@ if [ x"$CXX" != x"icpc" ]; then
cp -r include $1/MUMPS
cp -r lib $1/MUMPS
MUMPS_extra_lib="$1/MUMPS/lib/libdmumps.a $1/MUMPS/lib/libmumps_common.a $1/MUMPS/lib/libpord.a -pthread "
MUMPS_extra_lib="-L$1/MUMPS/lib -ldmumps -lmumps_common -lpord -pthread "
configure_options="$configure_options --with-mumps=yes --with-mumps-include=$1/MUMPS/include"
fi
else
echo "MUMPS already installed"
MUMPS_extra_lib="$1/MUMPS/lib/libdmumps.a $1/MUMPS/lib/libmumps_common.a $1/MUMPS/lib/libpord.a -pthread "
configure_options="$configure_options --with-mumps=yes --with-mumps-include=$1/MUMPS/include"
echo "MUMPS is already installed"
MUMPS_extra_lib="-L$1/MUMPS/lib -ldmumps -lmumps_common -lpord -pthread "
configure_options="$configure_options --with-mumps=yes --with-mumps-include=$1/MUMPS/include"
fi