diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe5e00b7..a9adb062 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,14 @@ jobs: os: [ubuntu-latest, macos-latest] mpi: [true, false] openmp: ['enabled', 'disabled'] + ecosys: [false] # ecosys==true fails with gcc, disable for now but leave placeholder exclude: # Do not build on macOS with MPI as that is having some dependency issues - os: macos-latest mpi: true + # Run test (fuk95 executed with mpi=false) fails with ecosys + - ecosys: true + mpi: false steps: - name: Install dependencies - Ubuntu run: | @@ -47,7 +51,7 @@ jobs: CC: gcc-12 FC: gfortran-12 run: | - meson setup builddir -Dmpi=${{ matrix.mpi }} -Dopenmp=${{ matrix.openmp }} --buildtype=debugoptimized + meson setup builddir -Dmpi=${{ matrix.mpi }} -Dopenmp=${{ matrix.openmp }} -Decosys=${{ matrix.ecosys }} --buildtype=debugoptimized meson compile -C builddir - name: Test code @@ -72,6 +76,10 @@ jobs: mpi: [true, false] openmp: ['enabled', 'disabled'] ecosys: [true, false] + exclude: + # Run test (fuk95 executed with mpi=false) fails with ecosys + - ecosys: true + mpi: false # Tell Meson to use Intel compilers env: CC: icc @@ -141,7 +149,7 @@ jobs: - name: Build with Intel compilers run: | source /opt/intel/oneapi/setvars.sh - meson setup builddir -Dmpi=${{ matrix.mpi }} -Dopenmp=${{ matrix.openmp }} --buildtype=debugoptimized + meson setup builddir -Dmpi=${{ matrix.mpi }} -Dopenmp=${{ matrix.openmp }} -Decosys=${{ matrix.ecosys }} --buildtype=debugoptimized meson compile -C builddir - name: Test code diff --git a/trc/restart_trcrd.F90 b/trc/restart_trcrd.F90 index aff3fba1..bbe636fe 100644 --- a/trc/restart_trcrd.F90 +++ b/trc/restart_trcrd.F90 @@ -32,12 +32,8 @@ subroutine restart_trcrd(rstfnm_ocn) logical :: error character(len=256) :: rstfnm_ocntrc - ! HAMOCC - character(len=256) :: rstfnm_hamocc #ifdef HAMOCC - logical :: use_hamocc = .true. -#else - logical :: use_hamocc = .false. + character(len=256) :: rstfnm_hamocc #endif ! ! --- ------------------------------------------------------------------ @@ -52,14 +48,14 @@ subroutine restart_trcrd(rstfnm_ocn) call xcstop('(restat_trcrd)') stop '(restart_trcrd)' endif - if (use_HAMOCC) then - call restart_getfile(rstfnm_ocn, 'rbgc', rstfnm_hamocc, error) - if (error) then - write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' - call xcstop('(restat_trcrd)') - stop '(restart_trcrd)' - endif - end if +#ifdef HAMOCC + call restart_getfile(rstfnm_ocn, 'rbgc', rstfnm_hamocc, error) + if (error) then + write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' + call xcstop('(restat_trcrd)') + stop '(restart_trcrd)' + endif +#endif else call restart_getfile(rstfnm_ocn, 'resttrc', rstfnm_ocntrc, error) if (error) then @@ -67,21 +63,21 @@ subroutine restart_trcrd(rstfnm_ocn) call xcstop('(restat_trcrd)') stop '(restart_trcrd)' endif - if (use_HAMOCC) then - call restart_getfile(rstfnm_ocn, 'restbgc', rstfnm_hamocc, error) - if (error) then - write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' - call xcstop('(restat_trcrd)') - stop '(restart_trcrd)' - endif - end if +#ifdef HAMOCC + call restart_getfile(rstfnm_ocn, 'restbgc', rstfnm_hamocc, error) + if (error) then + write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' + call xcstop('(restat_trcrd)') + stop '(restart_trcrd)' + endif +#endif endif endif call xcbcst(rstfnm_ocntrc) - if (use_HAMOCC) then - call xcbcst(rstfnm_hamocc) - end if +#ifdef HAMOCC + call xcbcst(rstfnm_hamocc) +#endif ! ! --- ------------------------------------------------------------------ @@ -90,9 +86,9 @@ subroutine restart_trcrd(rstfnm_ocn) ! call restart_ocntrcrd(rstfnm_ocntrc) - if (use_HAMOCC) then - call hamocc_init(1,rstfnm_hamocc) - end if +#ifdef HAMOCC + call hamocc_init(1,rstfnm_hamocc) +#endif return end subroutine restart_trcrd