-
Notifications
You must be signed in to change notification settings - Fork 43
285 lines (285 loc) · 11.5 KB
/
fabm.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
name: Build and test
on:
push:
branches:
- "**"
pull_request:
jobs:
gfortran:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
version: [9, 10, 11, 12, 13]
os: [ubuntu-latest]
include:
#- version: 4.8
# os: ubuntu-18.04
# cmake_args: -DFABM_USE_IEEE_ARITHMETIC=OFF
#- version: 5
# os: ubuntu-18.04
#- version: 6
# os: ubuntu-18.04
- version: 7
os: ubuntu-20.04
- version: 8
os: ubuntu-20.04
cmake_args: -DFABM_USE_CONTIGUOUS=OFF
fail-fast: false
runs-on: ${{ matrix.os }}
env:
FFLAGS: -fcheck=all
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ">=3.7"
- name: Install Python dependencies
run: python -m pip install --upgrade pip pyyaml
- name: Install compiler
run: |
sudo apt-get update
sudo apt-get install gfortran-${{ matrix.version }}
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run all test cases with host emulators
run: python3 util/developers/run_all_testcases.py harness --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
- name: Run all test cases with pyfabm
run: python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
ifort:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
include:
- version: "2021.1.2.62"
url_dir: "https://registrationcenter-download.intel.com/akdlm/irc_nas/17508"
- version: "2022.2.1.16992"
url_dir: "https://registrationcenter-download.intel.com/akdlm/irc_nas/18998"
- version: "2023.2.0.49254"
url_dir: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/237236c4-434b-4576-96ac-020ceeb22619"
fail-fast: false
runs-on: ubuntu-latest
env:
FFLAGS: -check all
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ">=3.7"
- name: Install Python dependencies
run: python -m pip install --upgrade pip pyyaml
- name: Install compiler
run: |
wget --no-verbose ${{ matrix.url_dir }}/l_fortran-compiler_p_${{ matrix.version }}_offline.sh
/bin/sh l_fortran-compiler_p_${{ matrix.version }}_offline.sh -a --silent --cli --install-dir ${HOME}/intel --eula accept
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run all test cases with host emulators
run: |
source ${HOME}/intel/setvars.sh
python3 util/developers/run_all_testcases.py harness --show_logs --compiler ifort
- name: Run all test cases with pyfabm
run: |
source ${HOME}/intel/setvars.sh
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifort
env:
FFLAGS: ${{ env.FFLAGS }} -fp-model precise -fp-model source
ifx:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
include:
- version: "2023.2.0.49254"
url_dir: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/237236c4-434b-4576-96ac-020ceeb22619"
#- version: "2024.0.2.28"
# url_dir: "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/41df6814-ec4b-4698-a14d-421ee2b02aa7"
fail-fast: false
runs-on: ubuntu-latest
env:
FFLAGS: -check all,nouninit,nocontiguous
# nouninit because https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-missing-clang-rt-msan-to-link-Fortran-program-in-debug-build/m-p/1536555
# nocontiguous because spurious errors occur when assigning null() to contiguous pointers
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ">=3.7"
- name: Install Python dependencies
run: python -m pip install --upgrade pip pyyaml
- name: Install compiler
run: |
wget --no-verbose ${{ matrix.url_dir }}/l_fortran-compiler_p_${{ matrix.version }}_offline.sh
/bin/sh l_fortran-compiler_p_${{ matrix.version }}_offline.sh -a --silent --cli --install-dir ${HOME}/intel --eula accept
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run all test cases with host emulators
run: |
source ${HOME}/intel/setvars.sh
python3 util/developers/run_all_testcases.py harness --show_logs --compiler ifx
- name: Run all test cases with pyfabm
run: |
source ${HOME}/intel/setvars.sh
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifx
env:
FFLAGS: ${{ env.FFLAGS }} -fp-model=precise
nvfortran:
# for available versions, see https://developer.nvidia.com/nvidia-hpc-sdk-releases
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
include:
- version: "20.9" # released 2020-10
exe: nvhpc_2020_209_Linux_x86_64_cuda_11.0
- version: "22.9" # released 2022-10
exe: nvhpc_2022_229_Linux_x86_64_cuda_11.7
- version: "23.7" # released 2023-07
exe: nvhpc_2023_237_Linux_x86_64_cuda_12.2
fail-fast: false
runs-on: ubuntu-latest
env:
FFLAGS: -Mbounds -Mchkptr
steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ">=3.7"
- name: Install Python dependencies
run: python -m pip install --upgrade pip pyyaml
- name: Install compiler
run: |
wget --no-verbose https://developer.download.nvidia.com/hpc-sdk/${{ matrix.version }}/${{ matrix.exe }}.tar.gz
tar xpzf ${{ matrix.exe }}.tar.gz
rm ${{ matrix.exe }}.tar.gz
${{ matrix.exe }}/install
env:
NVHPC_SILENT: true
NVHPC_INSTALL_DIR: /home/runner/nvhpc
NVHPC_INSTALL_TYPE: single
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run all test cases with host emulators
run: python3 util/developers/run_all_testcases.py harness --show_logs --compiler /home/runner/nvhpc/Linux_x86_64/${{ matrix.version }}/compilers/bin/pgfortran
- name: Run all test cases with pyfabm
run: python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler /home/runner/nvhpc/Linux_x86_64/${{ matrix.version }}/compilers/bin/pgfortran
aocc:
# for available versions, see https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/aocc/package.py
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
include:
- version: "3.2.0" # released 2021-12-02
pyfabm_cmake_args: -DCMAKE_Fortran_FLAGS_DEBUG= # skip -g as that triggers segfault
url_dir: https://download.amd.com/developer/eula/aocc-compiler
- version: "4.0.0" # released 2022-11-10
url_dir: https://download.amd.com/developer/eula/aocc-compiler
- version: "4.1.0" # released 2023-08-04
url_dir: https://download.amd.com/developer/eula/aocc/aocc-4-1
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ">=3.7"
- name: Install Python dependencies
run: python -m pip install --upgrade pip pyyaml
- name: Install compiler
run: |
cd /home/runner
wget --no-verbose ${{ matrix.url_dir }}/aocc-compiler-${{ matrix.version }}.tar
tar xpf aocc-compiler-${{ matrix.version }}.tar
rm aocc-compiler-${{ matrix.version }}.tar
./aocc-compiler-${{ matrix.version }}/install.sh
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run all test cases with host emulators
run: |
source /home/runner/setenv_AOCC.sh
python3 util/developers/run_all_testcases.py harness --show_logs --compiler flang
- name: Run all test cases with pyfabm
run: |
source /home/runner/setenv_AOCC.sh
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler flang ${{ matrix.pyfabm_cmake_args }}
pyfabm:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip build
- name: Build distribution
run: python -m build
- name: Install
run: python -m pip install .
- name: Test
run: |
python -c "import pyfabm;print('pyfabm version =', getattr(pyfabm, '__version__', None))"
for f in testcases/*.yaml; do fabm_describe_model $f; done
for f in testcases/*.yaml; do fabm_complete_yaml --add_missing $f; done
fabm0d:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Install NetCDF
run: |
sudo apt-get update
sudo apt-get install libnetcdff-dev
- name: Clone FABM
uses: actions/checkout@v4
with:
submodules: recursive
- name: Clone GOTM
uses: actions/checkout@v4
with:
repository: gotm-model/code
ref: v6.0
path: gotm
submodules: recursive
- name: Build
run: |
cmake -S src/drivers/0d -B build -DGOTM_BASE=gotm
cmake --build build --target install
stat ~/local/fabm/0d/bin/fabm0d
cmake:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
cmake-version: ["3.13"]
runs-on: ubuntu-latest
steps:
- name: Clone FABM
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download and extract cmake
run: |
wget --no-verbose https://cmake.org/files/v${{ matrix.cmake-version }}/cmake-${{ matrix.cmake-version }}.0-Linux-x86_64.tar.gz
tar -xvf cmake-${{ matrix.cmake-version }}.0-Linux-x86_64.tar.gz
- name: Build
run: |
cmake-${{ matrix.cmake-version }}.0-Linux-x86_64/bin/cmake -S . -B build
cmake-${{ matrix.cmake-version }}.0-Linux-x86_64/bin/cmake --build build --target install