Skip to content

Commit 948c8c7

Browse files
authored
add selmaprotbas to list of optional models (#107)
* add selmaprotbas to list of optional models * try fixing aocc by using python rather than python3 * install python after aocc * aocc: show python executable path * debug aocc * debug aocc * add aocc 5.0; debug aocc * debug aocc * debug aocc * debug aocc * debug aocc * debug aocc * debug aocc * clean-up * type correction * suppress aocc/flang warning * disable aocc-5-0 testing (buggy) * reduce unnecessary differences with master * drop special treatment of horizontal_shape
1 parent 2178e41 commit 948c8c7

3 files changed

Lines changed: 19 additions & 12 deletions

File tree

‎.github/workflows/fabm.yml‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ jobs:
4848
with:
4949
submodules: recursive
5050
- name: Run all test cases with host emulators
51-
run: python3 util/developers/run_all_testcases.py harness --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
51+
run: python util/developers/run_all_testcases.py harness --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
5252
- name: Run all test cases with pyfabm
53-
run: python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
53+
run: python util/developers/run_all_testcases.py pyfabm --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
5454
ifort:
5555
# for available versions, see https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
5656
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
@@ -87,11 +87,11 @@ jobs:
8787
- name: Run all test cases with host emulators
8888
run: |
8989
source ${HOME}/intel/setvars.sh
90-
python3 util/developers/run_all_testcases.py harness --show_logs --compiler ifort
90+
python util/developers/run_all_testcases.py harness --show_logs --compiler ifort
9191
- name: Run all test cases with pyfabm
9292
run: |
9393
source ${HOME}/intel/setvars.sh
94-
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifort
94+
python util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifort
9595
env:
9696
FFLAGS: ${{ env.FFLAGS }} -fp-model precise -fp-model source
9797
ifx:
@@ -132,13 +132,13 @@ jobs:
132132
- name: Run all test cases with host emulators
133133
run: |
134134
source ${HOME}/intel/setvars.sh
135-
python3 util/developers/run_all_testcases.py harness --show_logs --compiler ifx
135+
python util/developers/run_all_testcases.py harness --show_logs --compiler ifx
136136
env:
137137
FFLAGS: ${{ matrix.fflags }}
138138
- name: Run all test cases with pyfabm
139139
run: |
140140
source ${HOME}/intel/setvars.sh
141-
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifx
141+
python util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifx
142142
env:
143143
FFLAGS: ${{ matrix.fflags }} -fp-model=precise
144144
nvfortran:
@@ -187,9 +187,9 @@ jobs:
187187
with:
188188
submodules: recursive
189189
- name: Run all test cases with host emulators
190-
run: python3 util/developers/run_all_testcases.py harness --show_logs --compiler /home/runner/nvhpc/Linux_x86_64/${{ matrix.version }}/compilers/bin/pgfortran
190+
run: python util/developers/run_all_testcases.py harness --show_logs --compiler /home/runner/nvhpc/Linux_x86_64/${{ matrix.version }}/compilers/bin/pgfortran
191191
- name: Run all test cases with pyfabm
192-
run: python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler /home/runner/nvhpc/Linux_x86_64/${{ matrix.version }}/compilers/bin/pgfortran
192+
run: python util/developers/run_all_testcases.py pyfabm --show_logs --compiler /home/runner/nvhpc/Linux_x86_64/${{ matrix.version }}/compilers/bin/pgfortran
193193
aocc:
194194
# for available versions, see https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/aocc/package.py
195195
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
@@ -205,6 +205,8 @@ jobs:
205205
# url_dir: https://download.amd.com/developer/eula/aocc/aocc-4-1
206206
- version: "4.2.0" # released 2024-02-27 (LLVM 16.0.3)
207207
url_dir: https://download.amd.com/developer/eula/aocc/aocc-4-2
208+
# - version: "5.0.0" # released 2024-10-10 (LLVM 17.0.6)
209+
# url_dir: https://download.amd.com/developer/eula/aocc/aocc-5-0
208210
fail-fast: false
209211
runs-on: ubuntu-latest
210212
steps:
@@ -227,12 +229,16 @@ jobs:
227229
submodules: recursive
228230
- name: Run all test cases with host emulators
229231
run: |
232+
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
230233
source /home/runner/setenv_AOCC.sh
231-
python3 util/developers/run_all_testcases.py harness --show_logs --compiler flang
234+
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
235+
python util/developers/run_all_testcases.py harness --show_logs --compiler flang
232236
- name: Run all test cases with pyfabm
233237
run: |
238+
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
234239
source /home/runner/setenv_AOCC.sh
235-
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler flang ${{ matrix.pyfabm_cmake_args }}
240+
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
241+
python util/developers/run_all_testcases.py pyfabm --show_logs --compiler flang ${{ matrix.pyfabm_cmake_args }}
236242
flang-new:
237243
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
238244
strategy:

‎src/CMakeLists.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ set(DEFAULT_INSTITUTES
2121
pisces # Pelagic Interactions Scheme for Carbon and Ecosystem Studies, https://doi.org/10.5194/gmd-8-2465-2015
2222
pml # Plymouth Marine Laboratory, United Kingdom
2323
selma # Simple EcoLogical Model for the Aquatic - PROGNOS
24+
selmaprotbas # Adaptation of SELMA as described in https://doi.org/10.1002/lno.12040
2425
su # Swansea University, United Kingdom
2526
uhh # University of Hamburg, Germany
2627
)
2728

28-
set(OPTIONAL_INSTITUTES ersem mops pclake pisces ihamocc ogs)
29+
set(OPTIONAL_INSTITUTES ersem mops pclake pisces ihamocc ogs selmaprotbas)
2930

3031
if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
3132
message(FATAL_ERROR "Please point cmake to the top-level directory with FABM source code, not to its src subdirectory.")

‎src/builtin/depth_mapping.F90‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ subroutine vertical_depth_range_do(self, _ARGUMENTS_DO_)
167167
class (type_vertical_depth_range), intent(in) :: self
168168
_DECLARE_ARGUMENTS_DO_
169169

170-
real :: z_center, h, z_top, z_bottom, h_overlap
170+
real(rk) :: z_center, h, z_top, z_bottom, h_overlap
171171

172172
_LOOP_BEGIN_
173173
_GET_(self%id_z, z_center)

0 commit comments

Comments
 (0)