forked from SeisSol/SeisSol
/
gitlab-cpu-pipeline.yml
193 lines (180 loc) · 5.23 KB
/
gitlab-cpu-pipeline.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
default:
tags:
- lrzcc-k8s-4cores-10gb
image:
name: $CI_REGISTRY_USER/$cpu_image_name:$cpu_image_version
entrypoint: [""]
variables:
HOST: "hsw"
stages:
- pre_build
- build
- test
- check
fetch_submodules:
stage: pre_build
variables:
GIT_STRATEGY: clone
before_script:
- git branch -vva
- echo $commit_author_name
script:
- git submodule init
- sed -i 's/\.\.\/\.\./https\:\/\/github\.com/g' .gitmodules
- git submodule sync
- git submodule update --init --recursive
artifacts:
paths:
- submodules
retry: 2
build_seissol:
stage: build
needs:
- job: fetch_submodules
parallel:
matrix:
- precision: [double, single]
build_type: [Debug, Release]
script:
- cmake --version
- equation=elastic
- mechanisms=0
- for equation in elastic ;
do dirname="build_${equation}_${precision}_${build_type}";
echo "mkdir $dirname";
if [ "$equation" = viscoelastic2 ]; then mechanisms=3; else mechanisms=0; fi;
mkdir -p $dirname && cd $dirname ;
pwd;
CMAKE_PREFIX_PATH=~ ;
cmake ..
-DNETCDF=OFF
-DMETIS=ON
-DCOMMTHREAD=ON
-DASAGI=OFF
-DHDF5=ON
-DCMAKE_BUILD_TYPE=$build_type
-DTESTING=ON
-DLOG_LEVEL=warning
-DLOG_LEVEL_MASTER=info
-DHOST_ARCH=${HOST}
-DPRECISION=$precision
-DEQUATIONS=$equation
-DNUMBER_OF_MECHANISMS=$mechanisms
-DDR_QUAD_RULE=stroud
-DGEMM_TOOLS_LIST=LIBXSMM
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON;
make -j $(nproc);
cd .. ;
done;
artifacts:
paths:
- build_*
retry: 2
run_unit_tests:
stage: test
allow_failure: true
needs:
- job: build_seissol
parallel:
matrix:
- DIR: build_elastic_double_Debug
- DIR: build_elastic_single_Debug
- DIR: build_elastic_double_Release
- DIR: build_elastic_single_Release
script:
- echo "testing"
- pwd
- ls
- cd $DIR
- export CTEST_OUTPUT_ON_FAILURE=1
- make test
retry: 2
run_tpv:
stage: test
allow_failure: false
needs:
- job: build_seissol
parallel:
matrix:
- precision: [double, single]
tpv: [5, 5-nuc, 6, 16, 101, 101-slip, 104, 105, yoffe, gaussian]
script:
- echo "run TPV${tpv}"
- git clone https://github.com/SeisSol/precomputed-seissol.git
- ls
- cd precomputed-seissol
- git checkout b60e02c
- cd ..
- cd build_elastic_${precision}_Release
- cp -r ../precomputed-seissol/tpv${tpv}/* .
- ls
- mkdir ./output
- export NUM_COMP_CORES=$(expr $(nproc) - 1)
- export OMP_NUM_THREADS=$NUM_COMP_CORES
- export OMP_PLACES="cores($NUM_COMP_CORES)"
- ulimit -Ss unlimited
- ./SeisSol_Release_*_elastic ./parameters.par
- mv ./precomputed/${precision} ./output/precomputed
- mv ./output ../output-tpv{$tpv}-${precision}
artifacts:
paths:
- output-*
retry: 2
check_faultoutput:
stage: check
allow_failure: false
needs:
- job: run_tpv
variables:
elastic_domain_file: "tpv.xdmf"
fault_file: "tpv-fault.xdmf"
epsilon: "0.05"
parallel:
matrix:
- precision: [double, single]
tpv: [5, 5-nuc, 6, 16, 101, 101-slip, 104, 105, yoffe, gaussian]
script:
- echo "check TPV{$tpv}"
- ls
- cd output-tpv{$tpv}-${precision}
- ls
- python3 ../postprocessing/validation/compare-faults.py ./${fault_file} ./precomputed/${fault_file} --epsilon ${epsilon}
retry: 2
check_receivers:
stage: check
allow_failure: false
needs:
- job: run_tpv
variables:
epsilon: "0.05"
parallel:
matrix:
- precision: [double, single]
tpv: [5, 5-nuc, 6, 101, 101-slip, 104, 105, yoffe, gaussian]
script:
- echo "check TPV${tpv}"
- ls
- cd output-tpv{$tpv}-${precision}
- ls
- if [ ${tpv} = 5 ] || [ ${tpv} = 5-nuc ] || [ ${tpv} = 6 ] || [ ${tpv} = 16 ]; then mode=lsw; elif [ ${tpv} = 105 ]; then mode=tp; else mode=rs; fi;
python3 ../postprocessing/validation/compare-receivers.py . ./precomputed --epsilon ${epsilon} --mode $mode
retry: 2
check_energies:
stage: check
allow_failure: false
needs:
- job: run_tpv
variables:
energy_file: "tpv-energy.csv"
epsilon: "0.05"
parallel:
matrix:
- precision: [double, single]
tpv: [5, 5-nuc, 6, 16, 101, 101-slip, 104, 105, yoffe, gaussian]
script:
- echo "check TPV${tpv}"
- ls
- cd output-tpv{$tpv}-${precision}
- ls
- python3 ../postprocessing/validation/compare-energies.py ./${energy_file} ./precomputed/${energy_file} --epsilon ${epsilon}
retry: 2