diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 045a10e5..d3595297 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -172,14 +172,15 @@ jobs: if [[ "$MF6_REMOTE" != "$req_remote" ]]; then echo "bad mf6 remote in .mf6_ci_ref_remote"; exit 1; fi - name: Setup gfortran + if: runner.os != 'macOS' uses: fortran-lang/setup-fortran@v1 with: compiler: gcc version: 11 - - name: Link gfortran dylibs on Mac - if: runner.os == 'macOS' - run: .github/scripts/symlink_gfortran_mac.sh + # - name: Link gfortran dylibs on Mac + # if: runner.os == 'macOS' + # run: .github/scripts/symlink_gfortran_mac.sh - name: Install Dependencies via Micromamba uses: mamba-org/setup-micromamba@v1.9.0 diff --git a/autotest/ci_local.sh b/autotest/ci_local.sh index 557ae5e0..aac220e9 100755 --- a/autotest/ci_local.sh +++ b/autotest/ci_local.sh @@ -464,30 +464,30 @@ if [ -z "${t}" ]; then --domain=ucb_2yr \ --control_pattern=nhm.control \ --durations=0 || exit 1 - fi - if [ -z "${g}" ]; then - echo + if [ -z "${g}" ]; then + echo + echo ".........." + echo "ucb_2yr_nhm_transp_frost - generate and manage test data" + echo ".........." + echo + python generate_test_data.py \ + -n=$pytest_n --domain=ucb_2yr --control_pattern=frost.control \ + --remove_prms_csvs --remove_prms_output_dirs || exit 1 + fi + echo ".........." - echo "ucb_2yr_nhm_transp_frost - generate and manage test data" + echo "ucb_2yr_nhm_transp_frost - pywatershed tests" echo ".........." echo - python generate_test_data.py \ - -n=$pytest_n --domain=ucb_2yr --control_pattern=frost.control \ - --remove_prms_csvs --remove_prms_output_dirs || exit 1 + pytest \ + -vv \ + -n=$pytest_n \ + test_prms_atmosphere_transp_frost.py \ + --domain=ucb_2yr \ + --control_pattern=frost.control \ + --durations=0 || exit 1 fi - - echo ".........." - echo "ucb_2yr_nhm_transp_frost - pywatershed tests" - echo ".........." - echo - pytest \ - -vv \ - -n=$pytest_n \ - test_prms_atmosphere_transp_frost.py \ - --domain=ucb_2yr \ - --control_pattern=frost.control \ - --durations=0 || exit 1 fi if [ -z "${i}" ]; then diff --git a/bin/prms_mac_m1_gfortran_clang_dbl_prec b/bin/prms_mac_m1_gfortran_clang_dbl_prec new file mode 100755 index 00000000..9b6ff72a Binary files /dev/null and b/bin/prms_mac_m1_gfortran_clang_dbl_prec differ diff --git a/bin/prms_mac_m1_gfortran_clang_single_prec b/bin/prms_mac_m1_gfortran_clang_single_prec new file mode 100755 index 00000000..ba2dea77 Binary files /dev/null and b/bin/prms_mac_m1_gfortran_clang_single_prec differ diff --git a/environment.yml b/environment.yml index 4eebe6eb..a3192d48 100644 --- a/environment.yml +++ b/environment.yml @@ -14,6 +14,7 @@ dependencies: - folium - geopandas - geoviews + - gfortran - git - holoviews<=1.20.0 - hvplot diff --git a/environment_w_jupyter.yml b/environment_w_jupyter.yml index 262cf17f..983e0e1f 100644 --- a/environment_w_jupyter.yml +++ b/environment_w_jupyter.yml @@ -14,6 +14,7 @@ dependencies: - folium - geopandas - geoviews + - gfortran - git - holoviews<=1.20.0 - hvplot diff --git a/prms_src/prms5.2.1/makelist_double_precision b/prms_src/prms5.2.1/makelist_double_precision index 223f23cc..260ea1a8 100644 --- a/prms_src/prms5.2.1/makelist_double_precision +++ b/prms_src/prms5.2.1/makelist_double_precision @@ -102,7 +102,7 @@ ifeq ($(detected_OS), Windows) CFLAGS = -Dfloat=double $(OPTLEVEL) -D$(ARC) -D_UF -Wall endif else - ifeq ($(CC), gcc) + ifeq ($(CC), $(filter $(CC), gcc clang)) CFLAGS = -Dfloat=double $(OPTLEVEL) -D$(ARC) -D_UF -Wall endif ifeq ($(CC), $(filter $(CC), icc mpiicc)) diff --git a/prms_src/prms5.2.1/mmf/defs.h b/prms_src/prms5.2.1/mmf/defs.h index f3da4772..024a40c8 100644 --- a/prms_src/prms5.2.1/mmf/defs.h +++ b/prms_src/prms5.2.1/mmf/defs.h @@ -16,7 +16,7 @@ #define FALSE 0 #define ftnint int -#define ftnlen int +#define ftnlen long #define M_LONG 1 #define M_FLOAT 2 @@ -73,4 +73,3 @@ //#define MAX_SAVE_MAP 5 #endif /* MMS_DEF_H */ - diff --git a/prms_src/prms5.2.1/mmf/protos.h b/prms_src/prms5.2.1/mmf/protos.h index 15072c7e..b6ab5d3d 100644 --- a/prms_src/prms5.2.1/mmf/protos.h +++ b/prms_src/prms5.2.1/mmf/protos.h @@ -17,7 +17,7 @@ /*** mmf.c **************************************************/ extern long setdims_ (void); -extern long call_modules_ (char *, int); +extern long call_modules_ (char *, ftnlen); /*** alloc_space.c **************************************************/ #undef EXTERN diff --git a/test_data/generate/conftest.py b/test_data/generate/conftest.py index ce263e97..8a608711 100644 --- a/test_data/generate/conftest.py +++ b/test_data/generate/conftest.py @@ -64,7 +64,9 @@ def exe(): exe_name = "prms_win_gfort_dbl_prec.exe" elif platform == "darwin": if processor() == "arm": - exe_name = "prms_mac_m1_ifort_dbl_prec" + # exe_name = "prms_mac_m1_ifort_dbl_prec" + # Revert this to ifort in final PR + exe_name = "prms_mac_m1_gfortran_clang_dbl_prec" else: exe_name = "prms_mac_intel_gfort_dbl_prec" elif platform == "linux":