-
Notifications
You must be signed in to change notification settings - Fork 65
281 lines (267 loc) · 11.2 KB
/
linux.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
name: linux
on: [push, pull_request]
jobs:
# Build all tutorials
tutorials_build:
name: GNU@7.5 C++14 [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DAMReX_PARTICLES=ON \
-DTUTORIAL_PYTHON=ON
cmake --build build -j 2
cmake --build build -j 2 --target pyamrex_pip_install
- name: Run Python
run: |
cd GuidedTutorials/MultiFab/
python main.py
cd ../HeatEquation/Source/
python main.py
# Build all tutorials
tutorials_cxx20:
name: GNU@10.3 C++20 OMP [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_gcc10.sh
- name: Build & Install
run: |
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_OMP=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DTUTORIAL_PYTHON=ON \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_C_COMPILER=$(which gcc-10) \
-DCMAKE_CXX_COMPILER=$(which g++-10) \
-DCMAKE_Fortran_COMPILER=$(which mpif90)
cmake --build build -j 2
cmake --build build -j 2 --target pyamrex_pip_install
- name: Run Python
run: |
cd GuidedTutorials/MultiFab/
python main.py
cd ../HeatEquation/Source/
python main.py
tutorials_clang:
name: Clang@6.0 C++14 SP Particles DP Mesh Debug [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
- name: Build & Install
run: |
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_MPI=OFF \
-DAMReX_PARTICLES=ON \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DAMReX_PRECISION=DOUBLE \
-DAMReX_PARTICLES_PRECISION=SINGLE \
-DTUTORIAL_PYTHON=ON \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
cmake --build build -j 2
cmake --build build -j 2 --target pyamrex_pip_install
- name: Run Python
run: |
cd GuidedTutorials/MultiFab/
python main.py
cd ../HeatEquation/Source/
python main.py
# Build all tutorials w/o MPI
tutorials-nonmpi:
name: GNU@7.5 C++14 NOMPI [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_MPI=OFF \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DAMReX_PARTICLES=ON \
-DTUTORIAL_PYTHON=ON
cmake --build build -j 2
cmake --build build -j 2 --target pyamrex_pip_install
- name: Run Python
run: |
cd GuidedTutorials/MultiFab/
python main.py
cd ../HeatEquation/Source/
python main.py
# Build all tutorials
tutorials-nofortran:
name: GNU@7.5 C++14 w/o Fortran [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nofortran.sh
- name: Build & Install
run: |
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_EB=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_FORTRAN=OFF \
-DTUTORIAL_PYTHON=ON
cmake --build build -j 2
cmake --build build -j 2 --target pyamrex_pip_install
- name: Run Python
run: |
cd GuidedTutorials/MultiFab/
python main.py
cd ../HeatEquation/Source/
python main.py
# Build all tutorials with CUDA 11.0.2 (recent supported)
tutorials-cuda11:
name: CUDA@11.2 GNU@9.3.0 C++17 Release [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nvcc11.sh
- name: Build & Install
run: |
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DAMReX_GPU_BACKEND=CUDA \
-DCMAKE_C_COMPILER=$(which gcc) \
-DCMAKE_CXX_COMPILER=$(which g++) \
-DCMAKE_CUDA_HOST_COMPILER=$(which g++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran) \
-DCMAKE_CUDA_STANDARD=17 \
-DCMAKE_CXX_STANDARD=17 \
-DAMReX_CUDA_ARCH=8.0 \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build -j 2
tutorials-dpcpp:
name: DPCPP GFortran@7.5 C++17 [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_dpcpp.sh
- name: Build & Install
run: |
set +e
source /opt/intel/oneapi/setvars.sh
set -e
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_CXX_COMPILER_ID="Clang" \
-DCMAKE_CXX_COMPILER_VERSION=12.0 \
-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT="17" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_GPU_BACKEND=SYCL \
-DCMAKE_C_COMPILER=$(which icx) \
-DCMAKE_CXX_COMPILER=$(which icpx) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
cmake --build build --parallel 2
# note: setting the CXX compiler ID is a work-around for
# the 2021.1 DPC++ release / CMake 3.19.0-3.19.1
# https://gitlab.kitware.com/cmake/cmake/-/issues/21551#note_869580
tutorials-hip:
name: HIP ROCm GFortran@9.3 C++17 [tutorials]
runs-on: ubuntu-20.04
# Have to have -Wno-deprecated-declarations due to deprecated atomicAddNoRet
# Have to have -Wno-gnu-zero-variadic-macro-arguments to avoid
# amrex/Src/Base/AMReX_GpuLaunchGlobal.H:15:5: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
# __launch_bounds__(amrex_launch_bounds_max_threads)
# ^
# /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:178:71: note: expanded from macro '__launch_bounds__'
# select_impl_(__VA_ARGS__, launch_bounds_impl1, launch_bounds_impl0)(__VA_ARGS__)
# ^
# /opt/rocm-4.1.1/hip/include/hip/hcc_detail/hip_runtime.h:176:9: note: macro 'select_impl_' defined here
# #define select_impl_(_1, _2, impl_, ...) impl_
env: {CXXFLAGS: "-Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments -Wno-pass-failed"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_hip.sh
- name: Build & Install
run: |
source /etc/profile.d/rocm.sh
hipcc --version
which clang
which clang++
cmake --version
# "mpic++ --showme" forgets open-pal in Ubuntu 20.04 + OpenMPI 4.0.3
# https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/1941786
# https://github.com/open-mpi/ompi/issues/9317
export LDFLAGS="-lopen-pal"
cd ExampleCodes
cmake -S . -B build_nofortran \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_FORTRAN=OFF \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_GPU_BACKEND=HIP \
-DAMReX_AMD_ARCH=gfx908 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_CXX_STANDARD=17
cmake --build build_nofortran -j 2