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

Adding install script

parent 1dc070fe
No related branches found
No related tags found
No related merge requests found
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
## Take all the options with the exception of --enable-install-req
AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
......@@ -26,6 +27,13 @@ AC_PROG_CXX
AC_CANONICAL_HOST
# Check that the compiler support mpi
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(mpi.h,[],[echo "mpi.h not found"
exit 200])
AC_LANG_POP([C++])
# Check target architetture
#AX_GCC_ARCHFLAG([], [CXXFLAGS="$CXXFLAGS $ax_cv_gcc_archflag"], [])
......@@ -76,7 +84,8 @@ fi
## Check for Metis
IMMDX_LIB_METIS([],[AC_MSG_ERROR(["Cannot detect metis, use the --with-metis option if it is not installed in the default location"])])
IMMDX_LIB_METIS([],[echo "Cannot detect metis, use the --with-metis option if it is not installed in the default location"
exit 201])
####### include OpenFPM_devices include path
......
install 0 → 100755
#! /bin/bash
## Take all the options with the exception of --enable-install-req
install_req=0
configure_options=""
for var in "$@"
do
echo $var
if [ test x"$var" -ne x"--enable-install-req" ]; then
configure_options= "$configure_options $var"
else
install_req=1
fi
done
## call the configure script
MPI_installed=0
METIS_installed=0
conf_err=1
if [ $install_req -eq 0 ]; then
./configure $configure_options
else
while [ $conf_err -ne 0 ]
do
./configure $configure_options
conf_err=$?
echo "Configure script terminated with $conf_err"
## if MPI or METIS installation required install it
if [ $conf_err -eq 200 ]; then
echo "MPI not found try to install"
if [ $MPI_installed -eq 1 ]; then
echo "Error the installation of MPI failed"
exit 1
fi
./install_MPI.sh
MPI_installed=1
export PATH="$PATH:${HOME}/MPI/bin"
configure_options="$configure_options CXX=mpic++ "
elif [ $conf_err -eq 201 ]; then
echo "Metis not found try to install"
if [ $METIS_installed -eq 1 ]; then
echo "Error the installation of METIS failed"
exit 1
fi
./install_Metis.sh
METIS_installed=1
configure_options=" $configure_options --with-metis=${HOME}/METIS "
elif [ $conf_err -ne 0 ]; then
echo "I do not know how to recover from this error"
exit 1
fi
done
fi
if [ $conf_err -eq 0 ]; then
echo -e "Configure \033[92;5m SUCCEED \033[0m"
else
echo -e "Configure \033[91;5m FAILED \033[0m"
fi
echo "Command used to configure"
echo ""
echo -e "\033[1m ./configure $configure_options \033[0m "
echo ""
if [ $MPI_installed -eq 1 ]; then
echo -e "MPI has been installed into: \033[5m $HOME/MPI \033[0m"
echo -e "Add the following to export PATH=\"$PATH:$HOME/MPI \""
echo -e " LD_LIBRARY_PATH=
fi
if [ $METIS_installed -eq 1 ]; then
echo -e "Metis has been installed into: \033[5m $HOME/METIS \033[0m"
fi
echo ""
echo ""
install_MPI.sh 100644 → 100755
#!/bin/bash
# check if the directory ${HOME}/MPI exist
if [ -d "${HOME}/MPI" ]; then
echo "MPI already installed"
exit 0
fi
mkdir ${HOME}/MPI
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
......
#! /bin/bash
# check if the directory ${HOME}/METIS exist
if [ -d "${HOME}/METIS" ]; then
echo "METIS already installed"
exit 0
fi
mkdir ${HOME}/METIS
wget http://ppmcore.mpi-cbg.de/upload/metis-5.1.0.tar.gz
tar -xf metis-5.1.0.tar.gz
......
......@@ -192,6 +192,7 @@ CPPFLAGS =
CUDA_CFLAGS = -I -I -I/usr/local/cuda/include
CUDA_LIBS = -L -L -L/usr/local/cuda/lib64 -lcuda -lcudart
CXX = mpic++
CXXCPP = mpic++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = --std=c++11 -march=native -mtune=native -Wall -O3 -g3 -funroll-loops
CYGPATH_W = echo
......@@ -200,7 +201,9 @@ DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /usr/bin/grep -E
EXEEXT =
GREP = /usr/bin/grep
INCLUDES_PATH = -I. -Isrc/config/ -I../../metis_install/include -I../../OpenFPM_IO/src -I../../OpenFPM_data/src -I../../OpenFPM_devices/src -I../../OpenFPM_vcluster/src/
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
......@@ -213,8 +216,8 @@ LIBS =
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/i-bird/Desktop/MOSAIC/OpenFPM_project/OpenFPM_pdata/missing makeinfo
METIS =
METIS_INCLUDE = -I/home/i-bird/Desktop/MOSAIC/OpenFPM_project/metis_install//include
METIS_LIB = -L/home/i-bird/Desktop/MOSAIC/OpenFPM_project/metis_install//lib
METIS_INCLUDE = -I/home/i-bird/METIS/include
METIS_LIB = -L/home/i-bird/METIS/lib
MKDIR_P = /usr/bin/mkdir -p
NVCC = /usr/local/cuda/bin/nvcc
NVCCFLAGS = -O3
......
......@@ -192,6 +192,7 @@ CPPFLAGS = @CPPFLAGS@
CUDA_CFLAGS = @CUDA_CFLAGS@
CUDA_LIBS = @CUDA_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
......@@ -200,7 +201,9 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INCLUDES_PATH = @INCLUDES_PATH@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
......
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