-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
376 lines (324 loc) · 9.51 KB
/
.gitlab-ci.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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
#Available stages to run in 'automatic' processing:
# For convenience, implicit stages have been made explicit here...
stages:
- Initialization
- Regular Installation
- Basic Testing
- Regular Testing
- Benchmarks
- Applications
- Breaking tests
- Configurations
- Finalization
- Release
# Add clone variables for concurent PIPELINES
variables:
GL_PIPELINE_PATH: $CI_BUILDS_DIR/GL_$CI_PIPELINE_ID
GL_BUILD_DIR: $GL_PIPELINE_PATH/build
GL_INSTALL_DIR: $GL_PIPELINE_PATH/install
GIT_DEPTH: 1 # No need to clone the whole history
GIT_CLONE_PATH: $GL_PIPELINE_PATH/$CI_RUNNER_ID/$CI_CONCURRENT_ID
PCVS_COMMAND: pcvs -v run --override --profile mpc --print errors -S
.pcvs_prepare: &pcvs_prepare
- export CI_PCVS_DIR="$GL_PIPELINE_PATH/step_$(echo "$CI_JOB_NAME" | sed -e "s/ /_/g")/"
- test -d "${CI_PCVS_DIR}" && rm -rf "${CI_PCVS_DIR}"
- mkdir -p "${CI_PCVS_DIR}"
- cd "${CI_PCVS_DIR}"
- echo "Step run from ${CI_PCVS_DIR}"
- source ${GL_INSTALL_DIR}/mpcvars.sh
- echo "MPC loaded from ${GL_INSTALL_DIR}/mpcvars.sh"
# Template nodes to be inserted to any CI step.
# This ensure the pipeline will be triggered only for these scenarios.
# Theses lines should never be modified.
.run_by_main: &run_by_main
only:
- devel
- merge_requests
- web
except:
variables:
# Skip MR labeled "CI::Disabled"
- $CI_MERGE_REQUEST_LABELS =~ /CI::Disabled/
.uses_slurm: &uses_slurm
tags:
- slurm
############################
##### EXTRA ACTIONS ########
############################
#these actions should herit from implicit stages ".pre" and ".post"
# pre-actions to cleanup the machine before the run
# this job will be run in ANY pipeline -> ensure to enable all proper tags
# CAUTION : Otherwise tag-specific runners won't allow to run the whole pipeline because
# both .pre and .post cannot be scheduled (thus, why not using user-defined pre and post
# to avoid them to be run systematically ?)
Env Sanitize:
<<: *run_by_main
stage: Initialization
script:
- test -d $GL_PIPELINE_PATH && rm -rf $GL_PIPELINE_PATH
- mkdir -p $GL_PIPELINE_PATH
# post-actions to cleanup the machine after the run
# The last line may not be necessary as a pipeline start run something like a "git clean" before running
# This implies a probable issue when multiple piplines are run concurrently on the same project :(
# Please read the CAUTION above !
Artifact Deletion:
<<: *run_by_main
stage: Finalization
allow_failure: true
when: on_success
script:
- rm -rf $GL_PIPELINE_PATH
- $HOME/clean_old_pipelines.sh
Resource Relinquishing:
<<: *run_by_main
<<: *uses_slurm
stage: Finalization
allow_failure: true
when: always
script:
#
- scancel --name GL-build_$CI_PIPELINE_ID
# Ugly, our way to kill allocations from tests
- scancel -u $USER
############################
####### CONF STAGE ########
############################
.conf_run_cmds: &configuration_commands
- rm -rf ${GL_LOCAL_BUILD_DIR} ${GL_LOCAL_INSTALL_DIR}
- mkdir ${GL_LOCAL_BUILD_DIR}; cd ${GL_LOCAL_BUILD_DIR}
- ${CI_PROJECT_DIR}/installmpc -vv --force-spack-arch=x86_64_v2 --prefix=${GL_LOCAL_INSTALL_DIR} ${GL_INSTALL_OPTS}
MPC Default Configuration:
<<: *run_by_main
stage: Regular Installation
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}
GL_INSTALL_OPTS: --mpc-option="--enable-debug" --with-pmi1
script:
- spack env activate mpc
- *configuration_commands
- spack env deactivate
MPC Process Mode (no Spack):
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_nopriv_no_spack
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_nopriv
GL_INSTALL_OPTS: --disable-spack --disable-mpc-autopriv
script:
- *configuration_commands
MPC Process Mode:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_nopriv
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_nopriv
GL_INSTALL_OPTS: --disable-mpc-autopriv
script:
- *configuration_commands
MPC Disable Lowcomm:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_nolowcomm
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_nolowcomm
GL_INSTALL_OPTS: --disable-mpc-autopriv --mpc-option="--disable-lowcomm"
script:
- *configuration_commands
MPC Disable MPI:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_nompi
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_nompi
GL_INSTALL_OPTS: --disable-mpc-autopriv --mpc-option="--disable-mpi"
script:
- *configuration_commands
MPC Disable Threads:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_nothread
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_nothread
GL_INSTALL_OPTS: --disable-mpc-autopriv --mpc-option="--disable-threads"
script:
- *configuration_commands
MPC Debug Messages:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_debug
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_debug
GL_INSTALL_OPTS: --disable-mpc-autopriv --enable-debug --mpc-option="--enable-debug-messages"
script:
- *configuration_commands
MPC Slurm:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_slurm
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_slurm
GL_INSTALL_OPTS: --disable-mpc-autopriv --with-slurm
script:
- *configuration_commands
MPC PMIx:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_pmix
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_pmix
GL_INSTALL_OPTS: --disable-mpc-autopriv --with-pmix
script:
- *configuration_commands
MPC Compilation Workshare:
<<: *run_by_main
stage: Configurations
variables:
GL_LOCAL_BUILD_DIR: ${GL_BUILD_DIR}_workshare
GL_LOCAL_INSTALL_DIR: ${GL_INSTALL_DIR}_workshare
GL_INSTALL_OPTS: --mpc-option="--enable-debug" --enable-workshare
allow_failure: true
script:
- *configuration_commands
############################
####### TEST STAGE ########
############################
# a BASIC one, to stop the pipeline early in case of major issue (not able to compile/run a simple test)
Simple run:
<<: *run_by_main
<<: *uses_slurm
stage: Basic Testing
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/trivial/
Privatization:
<<: *run_by_main
<<: *uses_slurm
stage: Basic Testing
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/privatization/
#
## a regular test, to assess some basic MPC feature
#
MPI Simple C:
<<: *run_by_main
<<: *uses_slurm
stage: Regular Testing
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/MPI/simple/c/
MPI Simple Fortran:
<<: *run_by_main
<<: *uses_slurm
stage: Regular Testing
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/MPI/simple/fortran/
#MPI NBC:
# <<: *run_by_main
# <<: *uses_slurm
# stage: Regular Testing
# script:
# - *pcvs_prepare
# - ${PCVS_COMMAND} $HOME/repo/mpc_ci/MPI/NBC/
Lowcomm:
<<: *run_by_main
<<: *uses_slurm
stage: Regular Testing
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/lowcomm/
OpenMP Tasking:
<<: *run_by_main
<<: *uses_slurm
stage: Regular Testing
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/OpenMP/task/examples $HOME/repo/mpc_ci/OpenMP/task/cholesky
allow_failure: true
#
# Benchmarks
#
MPI IMB-MPI 2017:
<<: *run_by_main
<<: *uses_slurm
stage: Benchmarks
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/MPI/IMB_2017/check-mpi/
MPI NBC:
<<: *run_by_main
<<: *uses_slurm
stage: Benchmarks
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/MPI/NBC/
MPI IMB-NBC 2017:
<<: *run_by_main
<<: *uses_slurm
stage: Benchmarks
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/MPI/IMB_2017/check-nbc/
#
# Applications
#
Lulesh:
<<: *run_by_main
<<: *uses_slurm
stage: Applications
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/corals/lulesh-2.0.3/
miniFe:
<<: *run_by_main
<<: *uses_slurm
stage: Applications
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/corals/miniFe/
NAS-MZ MPI:
<<: *run_by_main
<<: *uses_slurm
stage: Applications
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/hybrid/NAS/MZ-MPI/
NAS-MZ OMP:
<<: *run_by_main
<<: *uses_slurm
stage: Applications
script:
- *pcvs_prepare
- ${PCVS_COMMAND} $HOME/repo/mpc_ci/hybrid/NAS/MZ-OMP/
###################################
####### MANUALLY TRIGGERED ########
###################################
#This section gathers jobs not scheduled to be part of the standard pipeline.
#They could be run manually or periodically.
#When triggered through a variable, MPC is built in containers with fixed software stack (base compiler, libc, etc...)
# to ensure MPC to compile in a large variety of environments
Debian Stretch:
stage: Regular Testing
script: "docker run --rm -it paratoolsfrance/mpc-env:debian-stretch $HOME/docker/run_installmpc.sh"
tags:
- "docker"
only:
variables:
- $MPC_CI_MODE == "multibuild"
Centos 7:
stage: Regular Testing
script: "docker run --rm -it paratoolsfrance/mpc-env:centos-7 $HOME/docker/run_installmpc.sh"
tags:
- "docker"
only:
variables:
- $MPC_CI_MODE == "multibuild"
release:
stage: Release
when: manual
script: utils/release_all.sh $CI_PROJECT_DIR/$CI_PIPELINE_ID
artifacts:
paths:
- $CI_PROJECT_DIR/$CI_PIPELINE_ID