-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathgitlab-ci-frontier.yml
255 lines (232 loc) · 6.02 KB
/
gitlab-ci-frontier.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
# Ad-hoc build that runs in the ECP Hardware, concretely in OLCF Frontier.
default:
id_tokens:
OLCF_ID_TOKEN:
aud: https://code.olcf.ornl.gov
stages:
- pre
- setup
- build
- post
.setup_env_ecpci: &setup_env_ecpci |
git fetch
source scripts/ci/gitlab-ci/setup-vars.sh
git checkout "$CI_COMMIT_REF"
module purge
module load ${JOB_MODULES}
module list
export PATH="${CCACHE_INSTALL_DIR}/ccache:$PATH"
.install_ccache: &install_ccache |
mkdir -p "$CCACHE_INSTALL_DIR"
cmake --version
cmake -VV -P .gitlab/config/ccache.cmake
ccache -z
ccache -s
.frontier-common:
variables:
CUSTOM_CI_BUILDS_DIR: "/lustre/orion/ums029/scratch/ums029_auser/ci/adios2/runtime"
OLCF_SERVICE_ACCOUNT: "ums029_auser"
.frontier-cmake-common:
rules:
- if: $CI_PIPELINE_SOURCE =~ /parent_pipeline|web/
interruptible: true
variables:
CCACHE_BASEDIR: "/lustre/orion/ums029/scratch/"
CCACHE_DIR: "/lustre/orion/ums029/scratch/ums029_auser/ci/adios2/ccache"
# -isystem= is not affected by CCACHE_BASEDIR, thus we must ignore it
CCACHE_IGNOREOPTIONS: "-isystem=*"
CCACHE_NOHASHDIR: "true"
CCACHE_INSTALL_DIR: "$CI_PROJECT_DIR/deps/ccache_install"
CMAKE_BUILD_TYPE: "RelWithDebInfo"
CMAKE_GENERATOR: "Ninja"
CMAKE_PREFIX_PATH: "$CI_PROJECT_DIR/deps/kokkos_install"
# We do not want to use the user's ~/.gitconfig
GIT_CONFIG_GLOBAL: "true"
GITLAB_SITE: "OLCF Frontier"
CI_BIN_DIR: "$CI_PROJECT_DIR/build"
extends:
.frontier-common
.setup-common:
stage: setup
tags: [ shell ]
before_script:
- *setup_env_ecpci
- *install_ccache
script:
- bash scripts/ci/gitlab-ci/run.sh update
artifacts:
expire_in: 24 hours
when: always
paths:
- deps/*install/
- build/
.build-common:
stage: build
tags: [frontier, slurm]
variables:
SCHEDULER_PARAMETERS: "-AUMS029 -pbatch -t 00:30:00 --nice=0 -c48 --threads-per-core=2 --gpus=8 -N 1"
before_script:
- *setup_env_ecpci
script:
- bash scripts/ci/gitlab-ci/run.sh configure
- bash scripts/ci/gitlab-ci/run.sh build
- bash scripts/ci/gitlab-ci/run.sh test
after_script:
- *setup_env_ecpci
- bash scripts/ci/gitlab-ci/run.sh submit
- ccache -s
.kokkos-hip-common:
variables:
Kokkos_DIR: "$CI_PROJECT_DIR/deps/kokkos_install"
# Cmake would not install a RPATH inside the source dir
LD_LIBRARY_PATH: "$Kokkos_DIR/lib64/:$LD_LIBRARY_PATH"
# Order matters
JOB_MODULES: >-
Core/24.00
lfs-wrapper
hsi
PrgEnv-gnu
gcc-native/12
craype-accel-amd-gfx90a
rocm/5.7.1
cmake
git
ninja
libffi
hdf5
zstd
setup:frontier-kokkos-hip:
variables:
KOKKOS_VER: 4.4.01
KOKKOS_OPTS: >-
-DCMAKE_INSTALL_PREFIX:PATH=$Kokkos_DIR
-DCMAKE_CXX_COMPILER:FILEPATH=/opt/rocm-5.7.1/hip/bin/hipcc
-DKokkos_ARCH_VEGA90A:BOOL=ON
-DKokkos_ENABLE_HIP:BOOL=ON
-DKokkos_ENABLE_HIP_RELOCATABLE_DEVICE_CODE:BOOL=OFF
-DKokkos_ENABLE_SERIAL:BOOL=ON
extends:
- .frontier-cmake-common
- .setup-common
- .kokkos-hip-common
before_script:
- *setup_env_ecpci
- *install_ccache
- .gitlab/config/kokkos.sh "$CI_PROJECT_DIR/deps" "$KOKKOS_VER" $KOKKOS_OPTS
build:frontier-kokkos-hip:
extends:
- .frontier-cmake-common
- .build-common
- .kokkos-hip-common
before_script:
- *setup_env_ecpci
needs:
- setup:frontier-kokkos-hip
dependencies:
- setup:frontier-kokkos-hip
.cray-common:
variables:
# Order matters
JOB_MODULES: >-
Core/24.00
PrgEnv-cray
cmake
git
ninja
libffi
zstd
extends:
- .frontier-cmake-common
setup:frontier-cray:
extends:
- .setup-common
- .cray-common
build:frontier-cray:
extends:
- .build-common
- .cray-common
needs:
- setup:frontier-cray
dependencies:
- setup:frontier-cray
.report-status:
rules:
- if: $CI_PIPELINE_SOURCE =~ /parent_pipeline|web/
tags: [ shell ]
extends:
.frontier-common
variables:
STATUS_PROJECT: ornladios/ADIOS2
STATUS_NAME: OLCF Frontier
before_script: |
git fetch
source scripts/ci/gitlab-ci/setup-vars.sh
git checkout "$CI_COMMIT_REF"
script: >
curl -X POST -H "${GITHUB_CURL_HEADERS}"
"https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_ORIGINAL_SHA}"
-d "{\"state\":\"${CI_JOB_NAME}\", \"context\":\"${STATUS_NAME}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"description\":\"${STATUS_DESC}\"}"
environment:
name: report-$DOWNSTREAM_COMMIT_SHA
pending:
stage: pre
variables:
STATUS_DESC: Pipeline is running
extends:
- .report-status
success:
stage: post
variables:
STATUS_DESC: Pipeline succeeded
extends:
- .report-status
dependencies:
- build:frontier-kokkos-hip
- build:frontier-cray
failure:
stage: post
rules:
- if: $CI_PIPELINE_SOURCE =~ /parent_pipeline|web/
when: on_failure
variables:
STATUS_DESC: Pipeline failed
extends:
- .report-status
dependencies:
- build:frontier-kokkos-hip
- build:frontier-cray
generate_pipelines:
stage: setup
extends:
.frontier-common
tags: [frontier, shell]
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
variables:
GL_PROJECT_ID: 105
# This the commit where the frontier CI was added, we want to avoid testing
# commits before this.
ROOT_COMMIT_SHA: 30368427fc41d57e428cdd15e7629dded2f71728
script:
- pip install --user urllib3 requests GitPython
- >
.gitlab/config/generate_pipelines.py
-u "https://code.olcf.ornl.gov/"
-r "${ROOT_COMMIT_SHA}"
-p "${GL_PROJECT_ID}"
-n ornladios/ADIOS2
-f .gitlab/config/dynamic_pipeline.yml.in
> generated_pipelines.yml
artifacts:
paths:
- generated_pipelines.yml
launch_pipelines:
stage: build
extends:
.frontier-common
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
trigger:
include:
- artifact: generated_pipelines.yml
job: generate_pipelines