Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
openfpm
openfpm_pdata
Commits
25a2c33a
Commit
25a2c33a
authored
Aug 06, 2015
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding install script
parent
1dc070fe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
115 additions
and
3 deletions
+115
-3
configure.ac
configure.ac
+10
-1
install
install
+82
-0
install_MPI.sh
install_MPI.sh
+7
-0
install_Metis.sh
install_Metis.sh
+8
-0
src/Makefile
src/Makefile
+5
-2
src/Makefile.in
src/Makefile.in
+3
-0
No files found.
configure.ac
View file @
25a2c33a
# -*- 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
View file @
25a2c33a
#! /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
\0
33[92;5m SUCCEED
\0
33[0m"
else
echo
-e
"Configure
\0
33[91;5m FAILED
\0
33[0m"
fi
echo
"Command used to configure"
echo
""
echo
-e
"
\0
33[1m ./configure
$configure_options
\0
33[0m "
echo
""
if
[
$MPI_installed
-eq
1
]
;
then
echo
-e
"MPI has been installed into:
\0
33[5m
$HOME
/MPI
\0
33[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:
\0
33[5m
$HOME
/METIS
\0
33[0m
"
fi
echo ""
echo ""
install_MPI.sh
100644 → 100755
View file @
25a2c33a
#!/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
...
...
install_Metis.sh
100644 → 100755
View file @
25a2c33a
#! /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
...
...
src/Makefile
View file @
25a2c33a
...
...
@@ -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
...
...
src/Makefile.in
View file @
25a2c33a
...
...
@@ -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@
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment