-
Notifications
You must be signed in to change notification settings - Fork 18
290 lines (288 loc) · 9.98 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
name: CI
on:
push:
branches:
- master
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:
# Fix for "Read -1, expected xxx errno = 1" https://github.com/open-mpi/ompi/issues/4948#issuecomment-395468231
OMPI_MCA_btl_vader_single_copy_mechanism: "none"
strategy:
matrix:
distro: ['ubuntu:latest']
cxx: ['g++', 'clang++']
backend: ['SERIAL', 'OPENMP']
cmake_build_type: ['Debug', 'Release']
kokkos_ver: ['4.0.01']
json: ['Internal']
heat_transfer: ['None']
include:
- distro: 'ubuntu:intel'
cxx: 'icpx'
backend: 'SERIAL'
cmake_build_type: 'Release'
kokkos_ver: '4.0.01'
json: External
heat_transfer: 'None'
- distro: 'ubuntu:intel'
cxx: 'icpx'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '4.0.01'
json: External
heat_transfer: 'None'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'SERIAL'
cmake_build_type: 'Debug'
kokkos_ver: '4.0.01'
json: External
heat_transfer: 'None'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'SERIAL'
cmake_build_type: 'Release'
kokkos_ver: '4.0.01'
json: External
heat_transfer: 'Finch'
runs-on: ubuntu-20.04
timeout-minutes: 30
container: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }}
continue-on-error: ${{ matrix.distro == 'ubuntu:intel' }}
steps:
- name: Checkout json
if: ${{ matrix.json == 'External' }}
uses: actions/checkout@v3
with:
repository: nlohmann/json
ref: v3.11.2
path: json
- name: Build json
if: ${{ matrix.json == 'External' }}
working-directory: json
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/json \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DJSON_BuildTests=OFF
cmake --build build --parallel 2
cmake --install build
- 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_${{ matrix.backend }}=ON \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DKokkos_ENABLE_HWLOC=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
if: ${{ matrix.heat_transfer == 'Finch' }}
uses: actions/checkout@v3
with:
repository: ECP-CoPA/Cabana
ref: 0.6.1
path: cabana
- name: Build Cabana
if: ${{ matrix.heat_transfer == 'Finch' }}
working-directory: cabana
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DCMAKE_INSTALL_PREFIX=$HOME/cabana \
-DCMAKE_PREFIX_PATH="$HOME/kokkos" \
-DCabana_ENABLE_GRID=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout Finch
if: ${{ matrix.heat_transfer == 'Finch' }}
uses: actions/checkout@v3
with:
repository: ORNL-MDF/Finch
# This is after the ability to extract data bounds was added
ref: ca46415b3cc1edc7cd6959e744e47d785c1d0e2a
path: finch
- name: Build Finch
if: ${{ matrix.heat_transfer == 'Finch' }}
working-directory: finch
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/finch \
-DCMAKE_PREFIX_PATH="$HOME/cabana" \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout ExaCA
uses: actions/checkout@v3
- name: Build ExaCA
run: |
cmake -B build \
-D CMAKE_INSTALL_PREFIX=$HOME/exaca \
-D CMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/json;$HOME/finch" \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-D MPIEXEC_MAX_NUMPROCS=2 \
-D MPIEXEC_PREFLAGS="--oversubscribe" \
-D ExaCA_ENABLE_TESTING=ON \
${exaca_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Unit test ExaCA
run: |
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
- name: Test ExaCA
working-directory: examples
run: |
$HOME/exaca/bin/ExaCA-Kokkos Inp_SmallDirSolidification.json
$HOME/exaca/bin/ExaCA-Kokkos Inp_SmallSpotMelt.json
mpirun -n 2 --oversubscribe $HOME/exaca/bin/ExaCA-Kokkos Inp_SmallDirSolidification.json
mpirun -n 2 --oversubscribe $HOME/exaca/bin/ExaCA-Kokkos Inp_SmallSpotMelt.json
- name: Test GA
working-directory: analysis/examples
run: |
$HOME/exaca/bin/ExaCA-Kokkos ../../examples/Inp_SmallDirSolidification.json
$HOME/exaca/bin/grain_analysis AnalyzeSmallDirS.json TestProblemSmallDirS
- name: Test Finch-ExaCA
if: ${{ matrix.heat_transfer == 'Finch' }}
working-directory: utilities/Finch
run: |
$HOME/exaca/bin/Finch-ExaCA inputs_small.json ../../examples/Inp_SmallFinch.json
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: ['Release']
# Using >4.0 because of kokkos build error without available device
kokkos_ver: ['4.2.00']
runs-on: ubuntu-20.04
container: ghcr.io/ecp-copa/ci-containers/rocm:latest
steps:
- name: Checkout json
uses: actions/checkout@v3
with:
repository: nlohmann/json
ref: v3.11.2
path: json
- name: Build json
working-directory: json
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/json \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DJSON_BuildTests=OFF
cmake --build build --parallel 2
cmake --install build
- 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_HIP=ON \
-DKokkos_ARCH_VEGA908=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout ExaCA
uses: actions/checkout@v3
- name: Build ExaCA
run: |
cmake -B build \
-D CMAKE_INSTALL_PREFIX=$HOME/exaca \
-D CMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/json" \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror -I${MPI_LOCATION}/include" \
-D CMAKE_EXE_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi" \
-D CMAKE_SHARED_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi" \
-D ExaCA_ENABLE_TESTING=ON
cmake --build build --parallel 2
cmake --install build
CUDA:
defaults:
run:
shell: bash
strategy:
matrix:
cxx: ['nvcc']
cmake_build_type: ['Release']
kokkos_ver: ['4.0.01']
runs-on: ubuntu-20.04
container: ghcr.io/ecp-copa/ci-containers/cuda:12.2.0
steps:
- name: Checkout json
uses: actions/checkout@v3
with:
repository: nlohmann/json
ref: v3.11.2
path: json
- name: Build json
working-directory: json
run: |
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/json \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DJSON_BuildTests=OFF
cmake --build build --parallel 2
cmake --install build
- 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_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ARCH_VOLTA72=ON \
-DKokkos_ENABLE_CUDA_LAMBDA=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout ExaCA
uses: actions/checkout@v3
- name: Build ExaCA
run: |
cmake -B build \
-D CMAKE_INSTALL_PREFIX=$HOME/exaca \
-D CMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/json" \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-D ExaCA_ENABLE_TESTING=ON
cmake --build build --parallel 2
cmake --install build