diff --git a/.github/actions/build-netcdf-mf6/action.yml b/.github/actions/build-netcdf-mf6/action.yml deleted file mode 100644 index 1a00359326a..00000000000 --- a/.github/actions/build-netcdf-mf6/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build NetCDF MF6 (Windows) -description: Build NetCDF MODFLOW 6 on Windows -runs: - using: "composite" - steps: - - - name: Build modflow6 - shell: cmd - run: | - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\compile_modflow6_netcdf.bat" "%TEMP%\compile_modflow6_netcdf.bat" - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\compile_modflow6_netcdf.bat" - - - name: Show Meson logs - if: failure() - shell: bash - working-directory: modflow6 - run: | - cat builddir/meson-logs/meson-log.txt - cat builddir/build.ninja diff --git a/.github/actions/build-par-win/action.yml b/.github/actions/build-par-win/action.yml deleted file mode 100644 index abc9a39b19d..00000000000 --- a/.github/actions/build-par-win/action.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Build parallel MF6 (Windows) -description: Build parallel MODFLOW 6 on Windows -runs: - using: "composite" - steps: - - - name: Setup PETSc - uses: ./modflow6/.github/actions/build-petsc-win - - - name: Build modflow6 - shell: cmd - run: | - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\compile_modflow6.bat" "%TEMP%\compile_modflow6.bat" - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\compile_modflow6.bat" - - - name: Show Meson logs - if: failure() - shell: bash - working-directory: modflow6 - run: cat builddir/meson-logs/meson-log.txt \ No newline at end of file diff --git a/.github/actions/test-extended-win/action.yml b/.github/actions/test-extended-win/action.yml index 7b0bbf56fbd..d090e24a354 100644 --- a/.github/actions/test-extended-win/action.yml +++ b/.github/actions/test-extended-win/action.yml @@ -3,7 +3,6 @@ description: Build and test extended MODFLOW 6 on Windows runs: using: "composite" steps: - - name: Build MF6 parallel uses: ./modflow6/.github/actions/build-extended-win @@ -22,57 +21,21 @@ runs: - name: Convert unix2dos shell: cmd run: | - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_parallel.bat" "%TEMP%\test_modflow6_parallel.bat" - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_serial.bat" "%TEMP%\test_modflow6_serial.bat" - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_netcdf.bat" "%TEMP%\test_modflow6_netcdf.bat" - - - name: Test programs (parallel) - if: github.ref_name != 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_parallel.bat" - - - name: Test programs (parallel) - if: github.ref_name == 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - MARKERS: not developmode - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_parallel.bat" - - - name: Test programs (netcdf) - if: github.ref_name != 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_netcdf.bat" - - - name: Test programs (netcdf) - if: github.ref_name == 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - MARKERS: not developmode - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_netcdf.bat" + unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_extended.bat" "%TEMP%\test_modflow6_extended.bat" - - name: Test programs (serial) + - name: Test programs (extended) if: github.ref_name != 'master' shell: cmd env: REPOS_PATH: ${{ github.workspace }} run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_serial.bat" + "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_extended.bat" - - name: Test programs (serial) + - name: Test programs (extended) if: github.ref_name == 'master' shell: cmd env: REPOS_PATH: ${{ github.workspace }} MARKERS: not developmode run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_serial.bat" + "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_extended.bat" diff --git a/.github/actions/test-extended/action.yml b/.github/actions/test-extended/action.yml index f0291cdcde4..24638edb8f5 100644 --- a/.github/actions/test-extended/action.yml +++ b/.github/actions/test-extended/action.yml @@ -85,9 +85,24 @@ runs: GITHUB_TOKEN: ${{ github.token }} run: pixi run get-exes - - name: Test programs + - name: Test programs (macOS) + if: runner.os == 'macOS' + shell: bash + working-directory: modflow6 + env: + REPOS_PATH: ${{ github.workspace }} + run: | + otool -L bin/libmf6.dylib + echo $DYLD_LIBRARY_PATH + pixi run autotest --parallel --netcdf -k "test_par or test_netcdf" + + - name: Test programs (Linux) + if: runner.os != 'macOS' shell: bash working-directory: modflow6 env: REPOS_PATH: ${{ github.workspace }} - run: pixi run autotest --parallel --netcdf -k "test_par or test_netcdf" + run: | + ldd bin/libmf6.so + echo $LD_LIBRARY_PATH + pixi run autotest --parallel --netcdf -k "test_par or test_netcdf" diff --git a/.github/actions/test-netcdf-win/action.yml b/.github/actions/test-netcdf-win/action.yml deleted file mode 100644 index 8130d6b4c7e..00000000000 --- a/.github/actions/test-netcdf-win/action.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Test NetCDF MF6 (Windows) -description: Build and test NetCDF MODFLOW 6 on Windows -runs: - using: "composite" - steps: - - - name: Build MF6 NetCDF - uses: ./modflow6/.github/actions/build-netcdf-win - - - name: Build MF6 NetCDF - uses: ./modflow6/.github/actions/build-netcdf-mf6 - - - name: Update flopy - working-directory: modflow6 - shell: cmd - run: pixi run update-flopy - - - name: Get executables - working-directory: modflow6/autotest - shell: cmd - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run get-exes - - - name: Convert unix2dos - shell: cmd - run: | - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_netcdf.bat" "%TEMP%\test_modflow6_netcdf.bat" - - - name: Test programs - if: github.ref_name != 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_netcdf.bat" - - - name: Test programs - if: github.ref_name == 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - MARKERS: not developmode - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_netcdf.bat" diff --git a/.github/actions/test-netcdf/action.yml b/.github/actions/test-netcdf/action.yml deleted file mode 100644 index ce94746548e..00000000000 --- a/.github/actions/test-netcdf/action.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Test NetCDF MF6 -description: Build and test NetCDF MODFLOW 6 -runs: - using: "composite" - steps: - - - name: Setup GNU Fortran - uses: fortran-lang/setup-fortran@v1 - with: - compiler: gcc - version: 13 - - - name: Install netcdf - if: runner.os == 'Linux' - shell: bash - run: | - sudo apt-get update - sudo apt-get install build-essential \ - libnetcdf-dev \ - libnetcdff-dev \ - netcdf-bin - nc-config --all - nf-config --all - - - name: Install netcdf - if: runner.os == 'macOS' - shell: bash - run: | - brew install netcdf-fortran - nc-config --all - nf-config - - - name: Build modflow6 - shell: bash - working-directory: modflow6 - run: | - pixi run setup -Dnetcdf=true builddir - pixi run build builddir - pixi run test builddir - - - name: Show Meson logs - if: failure() - shell: bash - working-directory: modflow6 - run: cat builddir/meson-logs/meson-log.txt - - - name: Update flopy - shell: bash - working-directory: modflow6 - run: pixi run update-flopy - - - name: Get executables - shell: bash - working-directory: modflow6 - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run get-exes - - - name: Test programs - shell: bash - working-directory: modflow6 - env: - REPOS_PATH: ${{ github.workspace }} - run: pixi run autotest --netcdf -k "test_netcdf" diff --git a/.github/actions/test-par-win/action.yml b/.github/actions/test-par-win/action.yml deleted file mode 100644 index 2cfd04858be..00000000000 --- a/.github/actions/test-par-win/action.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Test parallel MF6 (Windows) -description: Build and test parallel MODFLOW 6 on Windows -runs: - using: "composite" - steps: - - - name: Build MF6 parallel - uses: ./modflow6/.github/actions/build-par-win - - - name: Update flopy - working-directory: modflow6 - shell: cmd - run: pixi run update-flopy - - - name: Get executables - working-directory: modflow6/autotest - shell: cmd - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run get-exes - - - name: Convert unix2dos - shell: cmd - run: | - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_parallel.bat" "%TEMP%\test_modflow6_parallel.bat" - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_serial.bat" "%TEMP%\test_modflow6_serial.bat" - - - name: Test programs - if: github.ref_name != 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_parallel.bat" - - - name: Test programs - if: github.ref_name == 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - MARKERS: not developmode - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_parallel.bat" - - - name: Test programs (serial) - if: github.ref_name != 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_serial.bat" - - - name: Test programs (serial) - if: github.ref_name == 'master' - shell: cmd - env: - REPOS_PATH: ${{ github.workspace }} - MARKERS: not developmode - run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_serial.bat" diff --git a/.github/actions/test-par/action.yml b/.github/actions/test-par/action.yml deleted file mode 100644 index d95a8b0cd77..00000000000 --- a/.github/actions/test-par/action.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Test parallel MF6 -description: Build and test parallel MODFLOW 6 -runs: - using: "composite" - steps: - - name: Setup GNU Fortran - uses: fortran-lang/setup-fortran@v1 - with: - compiler: gcc - version: 13 - - - name: Checkout PETSc - if: runner.os != 'macOS' - uses: actions/checkout@v4 - with: - repository: petsc/petsc - path: petsc - ref: release - - - name: Checkout PETSc - if: runner.os == 'macOS' - uses: actions/checkout@v4 - with: - repository: petsc/petsc - path: petsc - ref: v3.22.1 - - - name: Configure environment - shell: bash - run: | - echo "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/petsc/arch-gcc-opt/lib/pkgconfig" >> $GITHUB_ENV - echo "$GITHUB_WORKSPACE/petsc/arch-gcc-opt/bin" >> $GITHUB_PATH - - - name: Configure PETSc - shell: bash - working-directory: petsc - run: | - sudo wget -P $GITHUB_WORKSPACE/petsc https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.2.tar.gz - sudo ./configure PETSC_ARCH=arch-gcc-opt --download-fblaslapack --download-openmpi=$GITHUB_WORKSPACE/petsc/openmpi-5.0.2.tar.gz --with-debugging=0 - sudo make all - - - name: Build modflow6 - shell: bash - working-directory: modflow6 - run: | - pixi run setup -Dparallel=true builddir - pixi run build builddir - pixi run test builddir - - - name: Show Meson logs - if: failure() - shell: bash - working-directory: modflow6 - run: cat builddir/meson-logs/meson-log.txt - - - name: Update flopy - shell: bash - working-directory: modflow6 - run: pixi run update-flopy - - - name: Get executables - shell: bash - working-directory: modflow6 - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run get-exes - - - name: Test programs - shell: bash - working-directory: modflow6 - env: - REPOS_PATH: ${{ github.workspace }} - run: pixi run autotest --parallel -k "test_par" - - - name: Test programs (serial) - shell: bash - working-directory: modflow6 - env: - REPOS_PATH: ${{ github.workspace }} - run: pixi run autotest diff --git a/.github/common/compile_modflow6.bat b/.github/common/compile_modflow6.bat deleted file mode 100644 index fa61f33885f..00000000000 --- a/.github/common/compile_modflow6.bat +++ /dev/null @@ -1,5 +0,0 @@ -set FC=ifort -cd "%GITHUB_WORKSPACE%\modflow6" -pixi run setup -Dparallel=true builddir -pixi run build builddir -pixi run test builddir diff --git a/.github/common/compile_modflow6_netcdf.bat b/.github/common/compile_modflow6_netcdf.bat deleted file mode 100644 index 1fe8301bcbf..00000000000 --- a/.github/common/compile_modflow6_netcdf.bat +++ /dev/null @@ -1,4 +0,0 @@ -set FC=ifort -cd "%GITHUB_WORKSPACE%\modflow6" -pixi run setup -Dnetcdf=true builddir -pixi run build builddir diff --git a/.github/common/compile_netcdf.bat b/.github/common/compile_netcdf.bat index 8a18b49cecf..94c18853332 100644 --- a/.github/common/compile_netcdf.bat +++ b/.github/common/compile_netcdf.bat @@ -3,9 +3,9 @@ cd "%GITHUB_WORKSPACE%\netcdf\netcdf-fortran-4.6.1\build" :: build/install static libs cmake --fresh -G Ninja -DCMAKE_Fortran_COMPILER="C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/ifort.exe" -DCMAKE_BUILD_TYPE=Release -DNETCDF_C_LIBRARY="%GITHUB_WORKSPACE%/netcdf/netCDF4.9.2-NC4-64/lib/netcdf.lib" -DNETCDF_C_INCLUDE_DIR="%GITHUB_WORKSPACE%/netcdf/netCDF4.9.2-NC4-64/include" -DBUILD_SHARED_LIBS=0 -DCMAKE_INSTALL_PREFIX="%GITHUB_WORKSPACE%/netcdf/netcdf-fortran-4.6.1/build" ../netcdf-fortran-4.6.1 cmake --build . -cmake –install . +cmake –-install . :: build/install shared libs cmake --fresh -G Ninja -DCMAKE_Fortran_COMPILER="C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/ifort.exe" -DCMAKE_BUILD_TYPE=Release -DNETCDF_C_LIBRARY="%GITHUB_WORKSPACE%/netcdf/netCDF4.9.2-NC4-64/lib/netcdf.lib" -DNETCDF_C_INCLUDE_DIR="%GITHUB_WORKSPACE%/netcdf/netCDF4.9.2-NC4-64/include" -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX="%GITHUB_WORKSPACE%/netcdf/netcdf-fortran-4.6.1/build" ../netcdf-fortran-4.6.1 cmake --build . -cmake –install . +cmake –-install . diff --git a/.github/common/test_modflow6_extended.bat b/.github/common/test_modflow6_extended.bat new file mode 100644 index 00000000000..337e8514f63 --- /dev/null +++ b/.github/common/test_modflow6_extended.bat @@ -0,0 +1,2 @@ +cd "%GITHUB_WORKSPACE%\modflow6\autotest" +pixi run autotest -m "%MARKERS%" --netcdf --parallel \ No newline at end of file diff --git a/.github/common/test_modflow6_netcdf.bat b/.github/common/test_modflow6_netcdf.bat deleted file mode 100644 index 920f55d1006..00000000000 --- a/.github/common/test_modflow6_netcdf.bat +++ /dev/null @@ -1,3 +0,0 @@ -cd "%GITHUB_WORKSPACE%\modflow6\autotest" -ldd ..\bin\mf6 -pixi run pytest -v --durations=0 --keep-failed .failed --netcdf -k "test_netcdf" -m "%MARKERS%" diff --git a/.github/common/test_modflow6_parallel.bat b/.github/common/test_modflow6_parallel.bat deleted file mode 100644 index e7e094e1e8b..00000000000 --- a/.github/common/test_modflow6_parallel.bat +++ /dev/null @@ -1,4 +0,0 @@ -cd "%GITHUB_WORKSPACE%\modflow6\autotest" -where libpetsc.dll -ldd ..\bin\mf6 -pixi run pytest -v --durations=0 --keep-failed .failed --parallel -k "test_par" -m "%MARKERS%" diff --git a/.github/common/test_modflow6_serial.bat b/.github/common/test_modflow6_serial.bat deleted file mode 100644 index 928045bf1ae..00000000000 --- a/.github/common/test_modflow6_serial.bat +++ /dev/null @@ -1,4 +0,0 @@ -cd "%GITHUB_WORKSPACE%\modflow6\autotest" -where libpetsc.dll -ldd ..\bin\mf6 -pixi run autotest -m "%MARKERS%" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0242775cf63..e5c4958ea3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -495,127 +495,6 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: pixi run test-dist-scripts - parallel_test: - name: Parallel testing - needs: - - lint - - build - - smoke_test - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, macos-13, windows-2022] - defaults: - run: - shell: bash - - steps: - - name: Checkout MF6 - uses: actions/checkout@v4 - with: - path: modflow6 - - - name: Checkout test models - uses: actions/checkout@v4 - with: - repository: MODFLOW-USGS/modflow6-testmodels - path: modflow6-testmodels - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - manifest-path: "modflow6/pixi.toml" - - - name: Custom pixi install - working-directory: modflow6 - run: pixi run install - - - name: Set LDFLAGS (macOS) - if: matrix.os == 'macos-13' - run: | - os_ver=$(sw_vers -productVersion | cut -d'.' -f1) - if (( "$os_ver" > 12 )); then - ldflags="$LDFLAGS -Wl,-ld_classic" - echo "LDFLAGS=$ldflags" >> $GITHUB_ENV - fi - - - name: Test parallel MF6 - if: runner.os != 'Windows' - uses: ./modflow6/.github/actions/test-par - - - name: Test parallel MF6 (Windows) - if: runner.os == 'Windows' - uses: ./modflow6/.github/actions/test-par-win - - - name: Upload failed test output - if: failure() - uses: actions/upload-artifact@v4 - with: - name: failed-${{ matrix.os }} - path: modflow6/autotest/.failed - - netcdf_test: - name: NetCDF testing - needs: - - lint - - build - - smoke_test - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ ubuntu-22.04, macos-13, windows-2022 ] - defaults: - run: - shell: bash - - steps: - - - name: Checkout MF6 - uses: actions/checkout@v4 - with: - path: modflow6 - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - manifest-path: "modflow6/pixi.toml" - - - name: Custom pixi install - working-directory: modflow6 - run: pixi run install - - - name: Install additional netcdf testing packages - working-directory: modflow6 - run: pixi run pip install xugrid xarray netcdf4 - - - name: Set LDFLAGS (macOS) - if: matrix.os == 'macos-13' - run: | - os_ver=$(sw_vers -productVersion | cut -d'.' -f1) - if (( "$os_ver" > 12 )); then - ldflags="$LDFLAGS -Wl,-ld_classic" - echo "LDFLAGS=$ldflags" >> $GITHUB_ENV - fi - - - name: Test NetCDF MF6 - if: runner.os != 'Windows' - uses: ./modflow6/.github/actions/test-netcdf - - - name: Test NetCDF MF6 - if: runner.os == 'Windows' - uses: ./modflow6/.github/actions/test-netcdf-win - - - name: Upload failed test output - if: failure() - uses: actions/upload-artifact@v4 - with: - name: failed-${{ matrix.os }} - path: modflow6/autotest/.failed - extended_test: name: Extended testing needs: @@ -626,7 +505,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, macos-13, windows-2022 ] + os: [ubuntu-22.04, macos-13, windows-2022] defaults: run: shell: bash