forked from ECP-copa/Cabana
-
Notifications
You must be signed in to change notification settings - Fork 0
436 lines (432 loc) · 16.3 KB
/
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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
name: CI
on:
push:
branches: [ hdf5.opt2 ]
pull_request:
branches:
- master
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
CI:
defaults:
run:
shell: bash
env:
CCACHE_DIR: "${{ github.workspace }}/.ccache"
CCACHE_MAXSIZE: "10G"
CCACHE_CPP2: "true"
ASAN_OPTIONS: "detect_leaks=0"
strategy:
matrix:
distro: ['ubuntu:latest']
cxx: ['g++', 'clang++']
backend: ['OPENMP', 'SERIAL']
cmake_build_type: ['Debug', 'Release']
kokkos_ver: ['3.7.02']
bounds_check: ['OFF']
arborx: ['OFF']
heffte: ['OFF' ]
hypre: ['OFF']
liball: ['OFF']
silo: ['OFF']
hdf5: ['OFF']
sanitizer: ['ASAN']
coverage: ['OFF']
include:
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'THREADS'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
silo: 'OFF'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'ArborX'
heffte: 'FFTW'
hypre: 'HYPRE'
liball: 'libALL'
silo: 'Silo'
hdf5: 'HDF5'
coverage: 'ON'
runs-on: ubuntu-20.04
timeout-minutes: 30
container:
image: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }}
options: --security-opt seccomp=unconfined
# FIXME: remove failing distributions here when passing
continue-on-error: ${{ (matrix.distro == 'ubuntu:intel' && matrix.backend == 'SERIAL' && matrix.cmake_build_type == 'Release') || matrix.distro == 'opensuse:latest' }}
steps:
- name: Cache ccache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.distro }}-${{github.run_id}}
restore-keys: ccache-${{ matrix.distro }}
- name: Zero ccache stats
run: |
ccache -z
- name: Checkout kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
env:
BOUNDS: ${{ matrix.bounds_check }}
working-directory: kokkos
run: |
[[ ${{ matrix.backend }} == "OPENMP" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_OPENMP==ON )
[[ ${{ matrix.backend }} == "THREADS" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_THREADS==ON )
[[ ${BOUNDS} == "BoundsCheck" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_DEBUG_BOUNDS_CHECK=ON )
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DKokkos_ENABLE_HWLOC=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
${kokkos_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout arborx
if: ${{ matrix.arborx == 'ArborX' }}
uses: actions/checkout@v3
with:
repository: arborx/ArborX
ref: v1.2
path: arborx
- name: Build arborx
if: ${{ matrix.arborx == 'ArborX' }}
working-directory: arborx
run: |
cmake -B build \
-DKokkos_ROOT=${HOME}/kokkos \
-DCMAKE_INSTALL_PREFIX=$HOME/arborx \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout heffte
if: ${{ matrix.heffte != 'OFF' }}
uses: actions/checkout@v3
with:
repository: icl-utk-edu/heffte
ref: v2.3.0
path: heffte
- name: Build heffte
if: ${{ matrix.heffte != 'OFF' }}
working-directory: heffte
run: |
[[ ${{ matrix.heffte }} == "FFTW" ]] && heffte_cmake_opts+=( -DHeffte_ENABLE_FFTW=ON )
[[ ${{ matrix.heffte }} == "MKL" ]] && heffte_cmake_opts+=( -DHeffte_ENABLE_MKL=ON )
cmake -B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=$HOME/heffte \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DMKL_ROOT=/opt/intel/oneapi/mkl/latest \
${heffte_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout hypre
if: ${{ matrix.hypre == 'HYPRE' }}
uses: actions/checkout@v3
with:
repository: hypre-space/hypre
ref: v2.22.1
path: hypre
- name: Build hypre
if: ${{ matrix.hypre == 'HYPRE' }}
working-directory: hypre/src
run: |
[[ ${{ matrix.backend }} == 'OPENMP' ]] && hypre_cmake_opts+=( -DHYPRE_WITH_OPENMP=ON )
cmake -B build \
-DHYPRE_INSTALL_PREFIX=$HOME/hypre \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DHYPRE_WITH_MPI=ON \
${hypre_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout HDF5
if: ${{ matrix.hdf5 }} == "HDF5" && ${{ matrix.distro }} == "ubuntu:latest" && ${{ matrix.cxx }} == "g++"
uses: actions/checkout@v3
with:
repository: HDFGroup/hdf5
ref: hdf5-1_14_3
path: hdf5-1_14_3
- name: Build HDF5
if: ${{ matrix.hdf5 }} == "HDF5" && ${{ matrix.distro }} == "ubuntu:latest" && ${{ matrix.cxx }} == "g++"
working-directory: hdf5-1_14_3
run: |
export CC=mpicc
export FC=mpif90
mkdir hdf5
cd hdf5
echo "HDF5_ROOT=$PWD" >> $GITHUB_ENV
cmake -C ../config/cmake/cacheinit.cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=$HDF5_ROOT \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DENABLE_EXTENDED_TESTS:BOOL=OFF \
-DHDF5_BUILD_EXAMPLES:BOOL=OFF \
-DHDF5_BUILD_HL_LIB:BOOL=OFF \
-DHDF5_BUILD_TOOLS=OFF \
-DHDF5_ENABLE_PARALLEL=ON \
-DHDF5_ENABLE_SUBFILING_VFD=ON\
-DBUILD_SHARED_LIBS:BOOL=ON \
..
make -j 8 install
- name: Checkout ALL
if: ${{ matrix.liball == 'libALL' }}
run: |
git clone --depth 1 --branch v0.9.2 https://gitlab.jsc.fz-juelich.de/SLMS/loadbalancing ALL
- name: Build ALL
if: ${{ matrix.liball == 'libALL' }}
working-directory: ALL
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/ALL
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/checkout@v3
- name: Build Cabana
env:
SANITIZER: ${{ matrix.sanitizer }}
SILO: ${{ matrix.silo }}
HDF5: ${{ matrix.hdf5 }}
run: |
if [[ ${SILO} == 'Silo' ]]; then
cabana_cmake_opts+=( -DCabana_REQUIRE_SILO=ON )
else
cabana_cmake_opts+=( -DCMAKE_DISABLE_FIND_PACKAGE_SILO=ON )
fi
if [[ ${HDF5} == 'HDF5' ]]; then
cabana_cmake_opts+=( -DCabana_REQUIRE_HDF5=ON )
else
cabana_cmake_opts+=( -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON )
fi
# FIXME: Add sanitizer for fedora/opensuse when fixed
if [[ ${SANITIZER} == 'MSAN' ]]; then
cabana_cmake_opts+=( -DWITH_MSAN=ON )
elif [[ ${{ matrix.distro }} != *"fedora"* ]]; then
if [[ ${{ matrix.distro }} != *"opensuse"* && ${{ matrix.backend }} != OPENMP ]]; then
cabana_cmake_opts+=( -DWITH_ASAN=ON )
fi
fi
#FIXME: Run valgrind for all builds once fixed/suppressed
[[ ${{ matrix.distro }} == *"ubuntu"* || ${{ matrix.backend }} == OPENMP || ${{ matrix.cmake_build_type }} == Release ]] && cabana_cmake_opts+=( -DVALGRIND_EXECUTABLE=False )
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/hypre;$HOME/ALL" \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror $([[ ${{ matrix.cxx }} == icpx ]] && echo -DCMAKE_CXX_FLAGS_DEBUG="-g -O0")" \
-DCabana_ENABLE_TESTING=ON \
-DCabana_ENABLE_EXAMPLES=ON \
-DCabana_ENABLE_PERFORMANCE_TESTING=ON \
-DCabana_PERFORMANCE_EXPECTED_FLOPS=0 \
-DCabana_ENABLE_COVERAGE_BUILD=${{ matrix.coverage }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DDOXYGEN_WARN_AS_ERROR=FAIL_ON_WARNINGS \
${cabana_cmake_opts[@]}
cmake --build build --parallel 2 --verbose
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
cmake --install build
- name: Test Cabana Export Target
working-directory: example/core_tutorial/01_hello_world
run: |
cmake -B build \
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/hypre;$HOME/Cabana" \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
cmake --build build
- name: Build Doxygen
if: ${{ matrix.doxygen == 'ON' }}
run: cmake --build build --target doxygen
- name: Show ccache stats
run: |
ccache -s
- name: Upload Report to codecov.io
if: ${{ matrix.coverage == 'ON' }}
uses: codecov/codecov-action@v1
- name: Checkout gh-pages
if: ${{ matrix.doxygen == 'ON' }}
uses: actions/checkout@v3
with:
ref: 'gh-pages'
path: 'html'
- name: update and commit to gh-pages branch
if: ${{ matrix.doxygen == 'ON' }}
working-directory: html
run: |
rm -rf doxygen
mv ../build/html doxygen
git config --global user.name "Automatic Deployment (GitHub Action)";
git config --global user.email "[email protected]"
git add --all
git diff --quiet HEAD || git commit -m "Documentation Update"
if [[ "${GITHUB_REF}" == 'refs/heads/master' ]]; then
git push
else
git show
fi
HIP:
defaults:
run:
shell: bash
env:
# Needed because FindMPI relies heavily on the compiler wrappers, which aren't used with hipcc
MPI_LOCATION: /usr/lib/x86_64-linux-gnu/openmpi/
strategy:
matrix:
cxx: ['hipcc']
cmake_build_type: ['Debug']
kokkos_ver: ['4.2.00']
runs-on: ubuntu-20.04
container: ghcr.io/ecp-copa/ci-containers/rocm:latest
steps:
- name: Checkout kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
working-directory: kokkos
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DKokkos_ENABLE_HIP=ON \
-DKokkos_ARCH_VEGA908=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout arborx
uses: actions/checkout@v3
with:
repository: arborx/ArborX
ref: v1.2
path: arborx
- name: Build arborx
working-directory: arborx
run: |
# Build without rocthrust (not available in this container)
cmake -B build \
-DARBORX_ENABLE_ROCTHRUST=OFF \
-DKokkos_ROOT=${HOME}/kokkos \
-DCMAKE_INSTALL_PREFIX=$HOME/arborx \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout ALL
run: |
git clone --depth 1 --branch v0.9.2 https://gitlab.jsc.fz-juelich.de/SLMS/loadbalancing ALL
- name: Build ALL
working-directory: ALL
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$HOME/ALL \
-DCMAKE_CXX_FLAGS="-I${MPI_LOCATION}/include" \
-DCMAKE_EXE_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi" \
-DCMAKE_SHARED_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi"
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/checkout@v3
- name: Build Cabana
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/ALL" \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-DCabana_ENABLE_TESTING=ON \
-DCabana_ENABLE_EXAMPLES=ON \
-DCabana_ENABLE_PERFORMANCE_TESTING=ON \
-DCabana_PERFORMANCE_EXPECTED_FLOPS=0 \
-DCMAKE_CXX_FLAGS="-I${MPI_LOCATION}/include" \
-DCMAKE_EXE_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi -lopen-pal" \
-DCMAKE_SHARED_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi -lopen-pal" \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON \
-DGPU_TARGETS="gfx908"
cmake --build build --parallel 2 --verbose
cmake --install build
CUDA:
defaults:
run:
shell: bash
strategy:
matrix:
cxx: ['nvcc']
cmake_build_type: ['Release']
kokkos_ver: ['3.7.02']
runs-on: ubuntu-20.04
container: ghcr.io/ecp-copa/ci-containers/cuda:12.2.0
steps:
- name: Checkout kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
working-directory: kokkos
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ARCH_VOLTA72=ON \
-DKokkos_ENABLE_CUDA_LAMBDA=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout arborx
uses: actions/checkout@v3
with:
repository: arborx/ArborX
ref: v1.2
path: arborx
- name: Build arborx
working-directory: arborx
run: |
cmake -B build \
-DKokkos_ROOT=${HOME}/kokkos \
-DCMAKE_INSTALL_PREFIX=$HOME/arborx \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/checkout@v3
- name: Build Cabana
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/ALL" \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-DCabana_ENABLE_TESTING=ON \
-DCabana_ENABLE_EXAMPLES=ON \
-DCabana_ENABLE_PERFORMANCE_TESTING=ON \
-DCabana_PERFORMANCE_EXPECTED_FLOPS=0 \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2 --verbose
cmake --install build