-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-octotiger-daint.sh
executable file
·71 lines (55 loc) · 2.32 KB
/
build-octotiger-daint.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
64
65
66
67
68
69
70
#!/usr/bin/env bash
set -exo pipefail
SOURCE_ROOT=$PWD
INSTALL_ROOT=$PWD
DIR_SRC=${SOURCE_ROOT}/src/octotiger/
DIR_BUILD=${INSTALL_ROOT}/build/octotiger/build
DEP_DIR=/apps/daint/UES/biddisco/gcc/7.3.0/
if [[ ! -d ${DIR_SRC} ]]; then
git clone -n https://github.com/STEllAR-GROUP/octotiger.git ${DIR_SRC}
cd ${DIR_SRC} && git checkout d6ad085
fi
CMAKE_version=3.12.0
MPI_version=7.7.2
CUDA_SM=sm_60
module unload PrgEnv-cray
module load PrgEnv-gnu
module unload gcc
module load gcc/7.3.0
module unload cray-libsci
module unload cray-mpich
module load cray-mpich/$MPI_version
module load daint-gpu
module load CMake/$CMAKE_version
module load cudatoolkit/9.2.148_3.19-6.0.7.1_2.1__g3d9acc8
CMAKE_COMMAND=$(which cmake)
export CC=/opt/cray/pe/craype/default/bin/cc
export CXX=/opt/cray/pe/craype/default/bin/CC
export CFLAGS=-fPIC
export CXXFLAGS="-fPIC -march=native -mtune=native -ffast-math -std=c++14"
export LDFLAGS="-dynamic"
export LDCXXFLAGS="$LDFLAGS -std=c++14 -latomic"
export LD_LIBRARY_PATH=/apps/daint/UES/biddisco/gcc/7.3.0/silo/lib/:/apps/daint/UES/biddisco/gcc/7.3.0/hdf5/1.10.4/lib/:$LD_LIBRARY_PATH
# -DHDF5_INCLUDE_DIRS=/apps/daint/UES/biddisco/gcc/7.3.0/hdf5/1.10.4/include \
# -DHDF5_LIBRARIES=/apps/daint/UES/biddisco/gcc/7.3.0/hdf5/1.10.4/lib/libhdf5.a \
${CMAKE_COMMAND} \
-H${DIR_SRC} \
-B${DIR_BUILD} \
-DCMAKE_PREFIX_PATH=${INSTALL_ROOT}/hpx \
-DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -fpermissive" \
-DCMAKE_EXE_LINKER_FLAGS="$LDCXXFLAGS -lz -L/apps/daint/UES/biddisco/gcc/7.3.0/hdf5/1.10.4/lib/ -lhdf5" \
-DCMAKE_SHARED_LINKER_FLAGS="$LDCXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="$LDCXXFLAGS -lz" \
-DOCTOTIGER_WITH_CUDA=ON \
-DCUDA_HOST_COMPILER=/opt/gcc/6.2.0/bin/gcc \
-DCMAKE_BUILD_TYPE=Release \
-DVc_DIR=/apps/daint/UES/biddisco/gcc/7.3.0/Vc/lib/cmake/Vc \
-DOCTOTIGER_WITH_SILO=ON \
-DBOOST_ROOT=/apps/daint/UES/biddisco/gcc/7.3.0/boost/7.3.0/1.68.0/ \
-DHPX_DIR=/apps/daint/UES/biddisco/gcc/7.3.0/hpx4octotiger-release/lib64/cmake/HPX/ \
-DHDF5_ROOT=/apps/daint/UES/biddisco/gcc/7.3.0/hdf5/1.10.4/ \
-DSilo_DIR=/apps/daint/UES/biddisco/gcc/7.3.0/silo/ \
-DCMAKE_CUDA_FLAGS="-arch=$CUDA_SM -std=c++14" \
-DOCTOTIGER_WITH_BLAST_TEST=ON
${CMAKE_COMMAND} --build ${DIR_BUILD} -- -j${PARALLEL_BUILD} VERBOSE=1