/
gitlab-cpu-pipeline.yml
226 lines (213 loc) · 6.52 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
default:
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
tags:
- sccs
- helper
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
expire_in: 2 days
retry: 2
build_seissol:
stage: build
tags:
- sccs
- build
needs:
- job: fetch_submodules
parallel:
matrix:
- precision: [double, single]
build_type: [Debug, Release]
equation: [elastic, anisotropic, poroelastic, viscoelastic2]
script:
- cmake --version
- mechanisms=0
- dirname="build_${equation}_${precision}_${build_type}";
if [ "$equation" = viscoelastic2 ] && [ "$build_type" == Debug ]; then echo "Skip ${dirname}" && exit 0; fi;
if [ "$equation" = anisotropic ] && [ "$build_type" == Debug ]; then echo "Skip ${dirname}" && exit 0; fi;
if [ "$equation" = poroelastic ] && [ "$build_type" == Debug ]; then echo "Skip ${dirname}" && exit 0; fi;
if [ "$equation" = viscoelastic2 ]; then mechanisms=3; else mechanisms=0; fi;
echo "mkdir $dirname";
mkdir -p $dirname && cd $dirname ;
pwd;
CMAKE_PREFIX_PATH=~ ;
cmake ..
-DNETCDF=ON
-DMETIS=ON
-DCOMMTHREAD=OFF
-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 .. ;
artifacts:
paths:
- build_*
expire_in: 2 days
retry: 2
run_unit_tests:
stage: test
allow_failure: true
tags:
- sccs
- cpu-hsw
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
- DIR: build_anisotropic_double_Release
- DIR: build_anisotropic_single_Release
- DIR: build_poroelastic_double_Release
- DIR: build_poroelastic_single_Release
- DIR: build_viscoelastic2_double_Release
- DIR: build_viscoelastic2_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
tags:
- sccs
- cpu-hsw
needs:
- job: build_seissol
parallel:
matrix:
- precision: [double, single]
tpv: [5, 5-nuc, 5-poro, 5-visco, 6, 13, 16, 101, 101-slip, 104, 105, ahsp, yoffe, gaussian]
script:
- echo "run TPV${tpv}"
- git clone https://github.com/SeisSol/precomputed-seissol.git
- ls
- cd precomputed-seissol
- git checkout 2ae63167d0c5e35cb01c56198dba94a2b7a224d9
- cd ..
- export equations=elastic
- if [ "$tpv" = ahsp ]; then equations=anisotropic; fi;
- if [ "$tpv" = 5-poro ]; then equations=poroelastic; fi;
- if [ "$tpv" = 5-visco ]; then equations=viscoelastic2; fi;
- cd build_${equations}_${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_*_${equations} ./parameters.par
- mv ./precomputed/${precision} ./output/precomputed
- mv ./output ../output-tpv{$tpv}-${precision}
artifacts:
paths:
- output-*
expire_in: 2 days
retry: 2
check_faultoutput:
stage: check
allow_failure: false
tags:
- sccs
- helper
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, 5-poro, 5-visco, 6, 13, 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
tags:
- sccs
- helper
needs:
- job: run_tpv
variables:
epsilon: "0.05"
parallel:
matrix:
- precision: [double, single]
tpv: [5, 5-nuc, 5-poro, 5-visco, 6, 13, 101, 101-slip, 104, 105, ahsp, 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
tags:
- sccs
- helper
needs:
- job: run_tpv
variables:
energy_file: "tpv-energy.csv"
epsilon: "0.05"
parallel:
matrix:
- precision: [double, single]
tpv: [5, 5-nuc, 5-poro, 5-visco, 6, 13, 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