-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig
46 lines (40 loc) · 2.22 KB
/
config
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
################################################################################
# This file is sourced by the build scripts to configure the build environment
# for the current machine. You can use this file to set machine-specific
# environment variables.
################################################################################
# Configure compiler flags for the current machine
# By default, we simply build with the highest instruction set available on the current machine
# if you want to use a different instruction set, you can set this in the CXX_FLAGS, CUDA_FLAGS, C_FLAGS,
# e.g.
# export C_FLAGS="-march=core-avx2 -fPIC"
# export CXX_FLAGS="-march=core-avx2 -fPIC"
# export CUDA_FLAGS="-arch=sm_35"
export C_FLAGS="-march=native -fPIC -O3 -ffast-math -fno-finite-math-only"
export CXX_FLAGS="${C_FLAGS}"
export CUDA_FLAGS="-arch=native --use_fast_math"
# Configure linker flags for the current machine. By default, we use the gold linker
export EXE_LINKER_FLAGS="-fuse-ld=gold"
# Also, the name of the python executable may vary for your system. You can set this here
export pythoncmd=python3
# Set additional cmake flags for deal.II.
# For a local build, we want to allow platform introspection.
# By default, we disable LTO for deal.II to speed up the build, but you can enable it here
export DEAL_II_CMAKE="DDEAL_II_ALLOW_PLATFORM_INTROSPECTION=ON \
-DDEAL_II_USE_LTO=OFF"
################################################################################
# Library-specific configuration
################################################################################
# check if dnsdomainname is thphys.uni-heidelberg.de, if yes, set some custom flags for deal.II
# first check if dnsdomainname is available
if command -v dnsdomainname &>/dev/null; then
if [[ "$(dnsdomainname)" = "thphys.uni-heidelberg.de" ]] || [[ "$(dnsdomainname)" = "itp.uni-heidelberg.de" ]]; then
export DEAL_II_CMAKE="
-DDEAL_II_ALLOW_PLATFORM_INTROSPECTION=ON \
-DLAPACK_LIBRARIES='/usr/lib/x86_64-linux-gnu/libopenblas.so' \
-DBLAS_LIBRARIES='/usr/lib/x86_64-linux-gnu/libopenblas.so'"
echo "Using specific flags for thphys.uni-heidelberg.de:"
echo ${DEAL_II_CMAKE}
echo
fi
fi