-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_toast-intel.sh
executable file
·59 lines (50 loc) · 1.47 KB
/
example_toast-intel.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
#!/bin/bash
#
# This script installs TOAST using the previously-built dependencies
#
# See the README for more details.
#
# The install PREFIX you used for dependencies. This will install
# TOAST to the same location.
PREFIX="$(pwd)/toast_stack"
# The version of TOAST to install
VERSION=2.3.12
# Compiler options (should match what you used for dependencies)
CC="icc"
CXX="icpc"
CFLAGS="-O3 -fPIC -pthread"
CXXFLAGS="-O3 -fPIC -pthread -std=c++11"
OPENMP_CXXFLAGS="-qopenmp"
# Dependencies. We are getting BLAS/LAPACK/FFT support from MKL.
AATM_ROOT="${PREFIX}"
SUITESPARSE_ROOT="${PREFIX}"
# Clone TOAST and checkout desired version
if [ -d toast ]; then
# We already have a clone of toast, just update
pushd toast >/dev/null 2>&1
git checkout master
git fetch
git rebase origin/master
else
git clone https://github.com/hpc4cmb/toast.git
pushd toast >/dev/null 2>&1
fi
git checkout -B bench ${VERSION}
rm -rf build
mkdir build
pushd build >/dev/null 2>&1
cmake \
-DCMAKE_C_COMPILER="${CC}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python3) \
-DAATM_ROOT="${AATM_ROOT}" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DSUITESPARSE_INCLUDE_DIR_HINTS="${SUITESPARSE_ROOT}/include" \
-DSUITESPARSE_LIBRARY_DIR_HINTS="${SUITESPARSE_ROOT}/lib" \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
..
make -j 4 install
popd >/dev/null 2>&1
popd >/dev/null 2>&1