forked from AMReX-Combustion/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
317 lines (292 loc) · 11.6 KB
/
gcc.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
# -Wextra-semi: GCC < 10 does not have this.
# -Wunreachable-code: GCC no longer has this option.
name: Linux GCC
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-linux-gcc
cancel-in-progress: true
jobs:
# Build and install libamrex as AMReX CMake project
# Note: this is an intentional "minimal" build that does not enable (many) options
library:
name: [email protected] C++17 Release [lib]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
mkdir build
cd build
cmake .. \
-DAMReX_FORTRAN=ON \
-DAMReX_PLOTFILE_TOOLS=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=/tmp/my-amrex \
-DCMAKE_CXX_STANDARD=17
make -j 2
make install
make test_install
export PATH=/tmp/my-amrex/bin:$PATH
which fcompare
ctest --output-on-failure
# Build libamrex and all tests
tests_build_3D:
name: [email protected] C++14 3D Debug Fortran [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -O1 -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
# It's too slow with -O0
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_SPACEDIM=3
cmake --build build -j 2
ctest --test-dir build --output-on-failure
tests_build_2D:
name: [email protected] C++14 2D Debug Fortran [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -O1 -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
# It's too slow with -O0
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_SPACEDIM=2
cmake --build build -j 2
ctest --test-dir build --output-on-failure
tests_build_1D:
name: [email protected] C++14 1D Debug Fortran [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -O1 -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
# -Werror temporarily skipped until we have functional testing established
# It's too slow with -O0
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_SPACEDIM=1
cmake --build build -j 2
ctest --test-dir build --output-on-failure
# Build libamrex and all tests
tests_cxx20:
name: [email protected] C++20 OMP [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_gcc10.sh
- name: Build & Install
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_ASSERTIONS=ON \
-DAMReX_TESTING=ON \
-DAMReX_EB=OFF \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_BOUND_CHECK=ON \
-DAMReX_FPE=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_OMP=ON \
-DAMReX_PARTICLES=ON \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_C_COMPILER=$(which gcc-10) \
-DCMAKE_CXX_COMPILER=$(which g++-10) \
-DCMAKE_Fortran_COMPILER=$(which gfortran-10)
make -j 2
ctest --output-on-failure
# Build libamrex and all tests w/o MPI
tests-nonmpi:
name: [email protected] C++14 NOMPI [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_ASSERTIONS=ON \
-DAMReX_TESTING=ON \
-DAMReX_BOUND_CHECK=ON \
-DAMReX_FPE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_MPI=OFF \
-DAMReX_PARTICLES=ON
make -j 2
ctest --output-on-failure
# Build libamrex and all tests
tests-nofortran:
name: [email protected] C++14 w/o Fortran [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wunreachable-code -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nofortran.sh
- name: Build & Install
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebINfo \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_ASSERTIONS=ON \
-DAMReX_TESTING=ON \
-DAMReX_BOUND_CHECK=ON \
-DAMReX_FPE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_FORTRAN=OFF \
-DAMReX_PARTICLES=ON \
-DAMReX_FORTRAN=OFF
make -j 2
ctest --output-on-failure
# Build 1D libamrex with configure
configure-1d:
name: [email protected] Release [configure 1D]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
./configure --dim 1
make -j2 XTRA_CXXFLAGS=-fno-operator-names
make install
# Build 3D libamrex with configure
configure-3d:
name: [email protected] Release [configure 3D]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
./configure --dim 3 --enable-eb yes --enable-xsdk-defaults yes
make -j2 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS=-fno-operator-names
make install
# Build 3D libamrex with single precision and tiny profiler
configure-3d-single-tprof:
name: [email protected] Release [configure 3D]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
./configure --dim 3 --enable-eb no --enable-xsdk-defaults no --single-precision yes --single-precision-particles yes --enable-tiny-profile yes
make -j2 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS=-fno-operator-names
make install
# Build 3D libamrex debug omp build with configure
configure-3d-omp-debug:
name: [email protected] OMP Debug [configure 3D]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
./configure --dim 3 --enable-eb yes --enable-xsdk-defaults yes --with-omp yes --debug yes
make -j2 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS=-fno-operator-names
make install
# Build Tools/Plotfile
plotfile-tools:
name: GNU Plotfile Tools [tools]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cd Tools/Plotfile
make -j2 USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS=-fno-operator-names
# Build libamrex and run all tests
tests_run:
name: [email protected] C++14 [tests]
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wunreachable-code -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
mkdir build
cd build
cmake .. \
-DAMReX_OMP=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_PARTICLES=ON
make -j 2
- name: Run tests
run: |
cd build
ctest --output-on-failure -R
test_hdf5:
name: [email protected] HDF5 I/O Test [tests]
runs-on: ubuntu-18.04
env:
CXX: h5pcc
CC: h5cc
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
sudo apt-get install libhdf5-openmpi-dev
sudo apt-get install hdf5-tools
- name: Build & Test
run: |
cd Tests/HDF5Benchmark
export OLCF_HDF5_ROOT=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
make -j 2
mpirun -np 2 ./main3d.gnu.TPROF.MPI.ex ./inputs
h5dump -d "level_0/data:offsets=0" -s "1" -c "1" ./plt00000.h5
h5dump -d "level_0/data:datatype=1" -s "1" -c "1" ./plt00000/particle0/particle0.h5