Commit a877b6da authored by Praetorius, Simon's avatar Praetorius, Simon

Merge branch 'issue/build_scripts' into 'master'

Issue/build scripts

- build scripts and install scripts with automatic boost and petsc builds
- configure scipt for an easy installation of amdis

See merge request !6
parents 2221c0b2 ae6a6828
......@@ -6,7 +6,6 @@ cache:
before_script:
- tools/install_boost.sh
- tools/install_petsc.sh
build:9-debug-gcc:
stage: build
......@@ -28,6 +27,7 @@ build:9-parallel-debug-gcc:
stage: build
image: duneci/base:9
script:
- tools/install_petsc.sh
- tools/build_parallel_amdis.sh Debug
only:
- master
......@@ -36,6 +36,7 @@ build:9-parallel-release-gcc:
stage: build
image: duneci/base:9
script:
- tools/install_petsc.sh
- tools/build_parallel_amdis.sh Release
only:
- master
This diff is collapsed.
......@@ -10,9 +10,9 @@ if [ "$1" == "Debug" ]; then
fi
# at first build AMDiS
cmake -E remove_directory ${ROOT}/build_${POSTFIX}
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
-DUSE_NEW_CMAKE:BOOL=ON \
-DCMAKE_INSTALL_PREFIX=${ROOT}/install_${POSTFIX} \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DENABLE_CXX11:BOOL=ON \
......@@ -20,10 +20,11 @@ cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
-DENABLE_UMFPACK:BOOL=OFF \
-DBOOST_ROOT:PATH=${ROOT}/install/boost \
${ROOT}/AMDiS
cmake --build ${ROOT}/build_${POSTFIX} --target install
cmake --build ${ROOT}/build_${POSTFIX} --target install -- -j2
# now build the demos
BASEDIR=${ROOT}/demo
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
......@@ -33,7 +34,8 @@ cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
cmake --build ${BASEDIR}/build_${POSTFIX}
# now build and run the test_suite
BASEDIR=${ROOT}/tools/test_suite
BASEDIR=${ROOT}/test
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
......
......@@ -13,9 +13,9 @@ if [ "$1" == "Debug" ]; then
fi
# at first build AMDiS
cmake -E remove_directory ${ROOT}/build_${POSTFIX}
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
-DUSE_NEW_CMAKE:BOOL=ON \
-DCMAKE_INSTALL_PREFIX=${ROOT}/install_${POSTFIX} \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DENABLE_CXX11:BOOL=ON \
......@@ -25,10 +25,11 @@ cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
-DBOOST_ROOT:PATH=${ROOT}/install/boost \
-DPETSC_DIR:PATH=${ROOT}/install/petsc \
${ROOT}/AMDiS
cmake --build ${ROOT}/build_${POSTFIX} --target install
cmake --build ${ROOT}/build_${POSTFIX} --target install -- -j2
# now build the demos
BASEDIR=${ROOT}/demo
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
......@@ -39,7 +40,8 @@ cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
cmake --build ${BASEDIR}/build_${POSTFIX}
# now build and run the test_suite
BASEDIR=${ROOT}/tools/test_suite
BASEDIR=${ROOT}/tests
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
......
......@@ -5,20 +5,22 @@ set -x
ROOT=${PWD}
if [ ! -d install/ ]; then
mkdir -p install
fi
cd install
BOOST_VERSION="1.62.0"
BOOST_FILENAME="boost_${BOOST_VERSION//[.]/_}.tar.gz"
INSTALL_PREFIX=${ROOT}/install
mkdir -p ${INSTALL_PREFIX}
#install current boost version
if [ ! -d boost ]; then
curl -o boost.tar.gz "http://netcologne.dl.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.gz"
mkdir boost_tmp
tar --strip-components=1 -xf boost.tar.gz -C boost_tmp
rm boost.tar.gz
cd boost_tmp
./bootstrap.sh --prefix=${ROOT}/install/boost --with-libraries=system,iostreams,filesystem,program_options,date_time
./b2 -s NO_BZIP2=1 cxxflags="-std=c++11" --build-type=minimal install
cd ${ROOT}/install
rm -rf boost_tmp
fi
\ No newline at end of file
BUILD_DIR=/tmp/$USER/boost_build
mkdir -p ${BUILD_DIR}
# install boost
if [ ! -d ${INSTALL_PREFIX}/boost ]; then
curl -SL "http://netcologne.dl.sourceforge.net/project/boost/boost/${BOOST_VERSION}/${BOOST_FILENAME}" \
| tar --strip-components=1 -xzC ${BUILD_DIR}
cd ${BUILD_DIR}
./bootstrap.sh --prefix=${INSTALL_PREFIX}/boost/${BOOST_VERSION}/ \
--with-libraries=system,iostreams,filesystem,program_options,date_time,unit_test_framework
./b2 -s NO_BZIP2=1 cxxflags="-std=c++11" --build-type=minimal variant=release -j 4 install
rm -rf ${BUILD_DIR}
fi
......@@ -5,25 +5,26 @@ set -x
ROOT=${PWD}
if [ ! -d install/ ]; then
mkdir -p install
fi
cd install
PETSC_VERSION="3.5.4"
PETSC_FILENAME="petsc-lite-${PETSC_VERSION}.tar.gz"
INSTALL_PREFIX=${ROOT}/install
mkdir -p ${INSTALL_PREFIX}
BUILD_DIR=/tmp/$USER/petsc_build
mkdir -p ${BUILD_DIR}
# install petsc
if [ ! -d petsc ]; then
curl -o petsc.tar.gz "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.4.tar.gz"
mkdir petsc_tmp
tar --strip-components=1 -xf petsc.tar.gz -C petsc_tmp
rm petsc.tar.gz
cd petsc_tmp
if [ ! -d ${INSTALL_PREFIX}/petsc ]; then
curl -SL "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${PETSC_FILENAME}" \
| tar --strip-components=1 -xzC ${BUILD_DIR}
cd ${BUILD_DIR}
# minimal petsc configuration, just for test purposes
./configure --prefix=${ROOT}/install/petsc --with-pic=1 --with-debugging=0 \
--with-clanguage=c++ --with-cxx-dialect=c++11 \
--with-metis=1 --download-metis=yes \
--with-parmetis=1 --download-parmetis=yes \
./configure --prefix=${INSTALL_PREFIX}/petsc/${PETSC_VERSION}/ --with-pic=1 \
--with-clanguage=c++ --with-debugging=0 \
--with-metis=1 --download-metis=yes \
--with-parmetis=1 --download-parmetis=yes \
--with-fblaslapack=1 --download-fblaslapack=yes
make && make install
cd ${ROOT}/install
rm -rf petsc_tmp
rm -rf ${BUILD_DIR}
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment