Skip to content

Commit

Permalink
add selmaprotbas to list of optional models (#107)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jornbr authored Jan 25, 2025
1 parent 2178e41 commit 948c8c7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/fabm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
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 }}
run: python 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 }}
run: python util/developers/run_all_testcases.py pyfabm --show_logs --compiler gfortran-${{ matrix.version }} ${{ matrix.cmake_args }}
ifort:
# for available versions, see https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down Expand Up @@ -87,11 +87,11 @@ jobs:
- 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
python 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
python util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifort
env:
FFLAGS: ${{ env.FFLAGS }} -fp-model precise -fp-model source
ifx:
Expand Down Expand Up @@ -132,13 +132,13 @@ jobs:
- 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
python util/developers/run_all_testcases.py harness --show_logs --compiler ifx
env:
FFLAGS: ${{ matrix.fflags }}
- 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
python util/developers/run_all_testcases.py pyfabm --show_logs --compiler ifx
env:
FFLAGS: ${{ matrix.fflags }} -fp-model=precise
nvfortran:
Expand Down Expand Up @@ -187,9 +187,9 @@ jobs:
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
run: python 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
run: python 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
Expand All @@ -205,6 +205,8 @@ jobs:
# url_dir: https://download.amd.com/developer/eula/aocc/aocc-4-1
- version: "4.2.0" # released 2024-02-27 (LLVM 16.0.3)
url_dir: https://download.amd.com/developer/eula/aocc/aocc-4-2
# - version: "5.0.0" # released 2024-10-10 (LLVM 17.0.6)
# url_dir: https://download.amd.com/developer/eula/aocc/aocc-5-0
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand All @@ -227,12 +229,16 @@ jobs:
submodules: recursive
- name: Run all test cases with host emulators
run: |
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
source /home/runner/setenv_AOCC.sh
python3 util/developers/run_all_testcases.py harness --show_logs --compiler flang
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
python util/developers/run_all_testcases.py harness --show_logs --compiler flang
- name: Run all test cases with pyfabm
run: |
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
source /home/runner/setenv_AOCC.sh
python3 util/developers/run_all_testcases.py pyfabm --show_logs --compiler flang ${{ matrix.pyfabm_cmake_args }}
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
python util/developers/run_all_testcases.py pyfabm --show_logs --compiler flang ${{ matrix.pyfabm_cmake_args }}
flang-new:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ set(DEFAULT_INSTITUTES
pisces # Pelagic Interactions Scheme for Carbon and Ecosystem Studies, https://doi.org/10.5194/gmd-8-2465-2015
pml # Plymouth Marine Laboratory, United Kingdom
selma # Simple EcoLogical Model for the Aquatic - PROGNOS
selmaprotbas # Adaptation of SELMA as described in https://doi.org/10.1002/lno.12040
su # Swansea University, United Kingdom
uhh # University of Hamburg, Germany
)

set(OPTIONAL_INSTITUTES ersem mops pclake pisces ihamocc ogs)
set(OPTIONAL_INSTITUTES ersem mops pclake pisces ihamocc ogs selmaprotbas)

if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Please point cmake to the top-level directory with FABM source code, not to its src subdirectory.")
Expand Down
2 changes: 1 addition & 1 deletion src/builtin/depth_mapping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ subroutine vertical_depth_range_do(self, _ARGUMENTS_DO_)
class (type_vertical_depth_range), intent(in) :: self
_DECLARE_ARGUMENTS_DO_

real :: z_center, h, z_top, z_bottom, h_overlap
real(rk) :: z_center, h, z_top, z_bottom, h_overlap

_LOOP_BEGIN_
_GET_(self%id_z, z_center)
Expand Down

0 comments on commit 948c8c7

Please sign in to comment.