build_parallel_amdis.sh 1.7 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/bash

set -e
set -x

ROOT=${PWD}
POSTFIX="par_rel"
CONFIURATION="Release"

if [ "$1" == "Debug" ]; then
  POSTFIX="par_dbg"
  CONFIURATION="Debug"
fi

# at first build AMDiS
16
cmake -E remove_directory ${ROOT}/build_${POSTFIX}
17
18
19
20
21
22
23
24
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
      -DCMAKE_INSTALL_PREFIX=${ROOT}/install_${POSTFIX} \
      -DCMAKE_BUILD_TYPE=${CONFIURATION} \
      -DENABLE_CXX11:BOOL=ON \
      -DENABLE_COMPRESSION:BOOL=OFF \
      -DENABLE_UMFPACK:BOOL=OFF \
      -DENABLE_PARALLEL_DOMAIN:BOOL=ON \
25
26
      -DBOOST_ROOT:PATH=${ROOT}/install/boost \
      -DPETSC_DIR:PATH=${ROOT}/install/petsc \
27
       ${ROOT}/AMDiS
28
cmake --build ${ROOT}/build_${POSTFIX} --target install -- -j2
29
30
31

# now build the demos
BASEDIR=${ROOT}/demo
32
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
33
34
35
36
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
      -DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
      -DCMAKE_BUILD_TYPE=${CONFIURATION} \
37
38
      -DBOOST_ROOT:PATH=${ROOT}/install/boost \
      -DPETSC_DIR:PATH=${ROOT}/install/petsc \
39
40
41
42
       ${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}

# now build and run the test_suite
43
44
BASEDIR=${ROOT}/tests
cmake -E remove_directory ${BASEDIR}/build_${POSTFIX}
45
46
47
48
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
      -DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
      -DCMAKE_BUILD_TYPE=${CONFIURATION} \
49
50
      -DBOOST_ROOT:PATH=${ROOT}/install/boost \
      -DPETSC_DIR:PATH=${ROOT}/install/petsc \
51
52
53
       ${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
cmake --build ${BASEDIR}/build_${POSTFIX} --target test