-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-gcc.sh
executable file
·63 lines (52 loc) · 1.89 KB
/
build-gcc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
set -eu -o pipefail
echo BUILD_ROOT "$BUILD_ROOT"
echo BUILD_NAME "$BUILD_NAME"
echo CORE_DIR "$CORE_DIR"
echo KERN_DIR "$KERN_DIR"
echo LOG_DIR "$LOG_DIR"
workdir="$BUILD_ROOT/$BUILD_NAME"
core_build="$workdir/core-build"
core_install="$workdir/core-install"
kern_build="$workdir/kern-build"
core_config_log="$LOG_DIR/${BUILD_NAME}_${KK_YEAR}_${KK_MONTH}_${KK_DAY}_config_core.log"
core_build_log="$LOG_DIR/${BUILD_NAME}_${KK_YEAR}_${KK_MONTH}_${KK_DAY}_build_core.log"
kern_config_log="$LOG_DIR/${BUILD_NAME}_${KK_YEAR}_${KK_MONTH}_${KK_DAY}_config_kern.log"
kern_build_log="$LOG_DIR/${BUILD_NAME}_${KK_YEAR}_${KK_MONTH}_${KK_DAY}_build_kern.log"
mkdir -p "$core_build"
mkdir -p "$core_install"
mkdir -p "$kern_build"
cd $workdir
cmake -S "$CORE_DIR" -B "$core_build" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$core_install" \
-DKokkos_ENABLE_SERIAL=ON \
-DCMAKE_BUILD_TYPE=Debug \
| tee "$core_config_log" 2>&1
cd $core_build
make -j`nproc` install | tee "$core_build_log" 2>&1
cd -
cmake -S "$KERN_DIR" -B "$kern_build" \
-DCMAKE_BUILD_TYPE=Release \
-DKokkos_DIR="$core_install/lib64/cmake/Kokkos" \
-DCMAKE_CXX_FLAGS="-Wall -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wignored-qualifiers -Wempty-body -Wuninitialized" \
-DKokkosKernels_ENABLE_TESTS=ON \
-DKokkosKernels_ENABLE_EXAMPLES:BOOL=ON \
-DKokkosKernels_INST_COMPLEX_DOUBLE=ON \
-DKokkosKernels_INST_DOUBLE=ON \
-DKokkosKernels_INST_COMPLEX_FLOAT=ON \
-DKokkosKernels_INST_FLOAT=ON \
-DKokkosKernels_INST_LAYOUTLEFT:BOOL=ON \
-DKokkosKernels_INST_LAYOUTRIGHT:BOOL=ON \
-DKokkosKernels_INST_OFFSET_INT=ON \
-DKokkosKernels_INST_OFFSET_SIZE_T=ON \
| tee "$kern_config_log" 2>&1
cd "$kern_build"
startDate=`date`
echo "====START==== $startDate" > "$kern_build_log"
make -j`nproc` | tee -a "$kern_build_log" 2>&1
endDate=`date`
echo "====END==== $endDate" >> "$kern_build_log"
cd -
rm -rf "$core_build"
rm -rf "$core_install"
rm -rf "$kern_build"