diff --git a/.github/actions/test-extended/action.yml b/.github/actions/test-extended/action.yml index 953df09622c..f0291cdcde4 100644 --- a/.github/actions/test-extended/action.yml +++ b/.github/actions/test-extended/action.yml @@ -3,7 +3,6 @@ description: Build and test Extended MODFLOW 6 runs: using: "composite" steps: - - name: Setup GNU Fortran uses: fortran-lang/setup-fortran@v1 with: @@ -17,44 +16,27 @@ runs: 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: release-3.21 - - - name: Configure environment - if: runner.os == 'Linux' - shell: bash - run: | - echo "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/petsc/linux-gnu/lib/pkgconfig" >> $GITHUB_ENV - echo "$GITHUB_WORKSPACE/petsc/linux-gnu/bin" >> $GITHUB_PATH + ref: v3.22.1 - name: Configure environment - if: runner.os == 'macOS' shell: bash run: | - echo "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/petsc/arch-darwin-gcc/lib/pkgconfig" >> $GITHUB_ENV - echo "$GITHUB_WORKSPACE/petsc/arch-darwin-gcc/bin" >> $GITHUB_PATH + 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 - if: runner.os == 'Linux' 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=linux-gnu --download-fblaslapack --download-openmpi=$GITHUB_WORKSPACE/petsc/openmpi-5.0.2.tar.gz --with-debugging=0 - sudo make all - - - name: Configure PETSc - if: runner.os == 'macOS' - shell: bash - working-directory: petsc - run: | - sudo ./configure PETSC_DIR="$GITHUB_WORKSPACE/petsc" PETSC_ARCH=arch-darwin-gcc --download-fblaslapack --download-openmpi --with-debugging=0 + 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: Install netcdf diff --git a/.github/actions/test-par/action.yml b/.github/actions/test-par/action.yml index 7b390758473..d95a8b0cd77 100644 --- a/.github/actions/test-par/action.yml +++ b/.github/actions/test-par/action.yml @@ -3,7 +3,6 @@ description: Build and test parallel MODFLOW 6 runs: using: "composite" steps: - - name: Setup GNU Fortran uses: fortran-lang/setup-fortran@v1 with: @@ -17,44 +16,27 @@ runs: 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: release-3.21 + ref: v3.22.1 - name: Configure environment - if: runner.os == 'Linux' - shell: bash - run: | - echo "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/petsc/linux-gnu/lib/pkgconfig" >> $GITHUB_ENV - echo "$GITHUB_WORKSPACE/petsc/linux-gnu/bin" >> $GITHUB_PATH - - - name: Configure environment - if: runner.os == 'macOS' shell: bash run: | - echo "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/petsc/arch-darwin-gcc/lib/pkgconfig" >> $GITHUB_ENV - echo "$GITHUB_WORKSPACE/petsc/arch-darwin-gcc/bin" >> $GITHUB_PATH + 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 - if: runner.os == 'Linux' 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=linux-gnu --download-fblaslapack --download-openmpi=$GITHUB_WORKSPACE/petsc/openmpi-5.0.2.tar.gz --with-debugging=0 - sudo make all - - - name: Configure PETSc - if: runner.os == 'macOS' - shell: bash - working-directory: petsc - run: | - sudo ./configure PETSC_DIR="$GITHUB_WORKSPACE/petsc" PETSC_ARCH=arch-darwin-gcc --download-fblaslapack --download-openmpi --with-debugging=0 + 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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42ba0f583ed..8e464da983b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,39 +2,39 @@ name: MODFLOW 6 continuous integration on: push: paths-ignore: - - '**.md' - - '**.pdf' - - '**.tex' - - '**.jpg' - - '**.jpeg' - - '**.png' - - '**.bbl' - - '**.bib' - - 'doc/**.dat' - - 'doc/**.ipynb' - - 'doc/**.py' - - 'doc/**.sh' - - 'doc/**.xlsx' - - '.hpc/**' + - "**.md" + - "**.pdf" + - "**.tex" + - "**.jpg" + - "**.jpeg" + - "**.png" + - "**.bbl" + - "**.bib" + - "doc/**.dat" + - "doc/**.ipynb" + - "doc/**.py" + - "doc/**.sh" + - "doc/**.xlsx" + - ".hpc/**" pull_request: branches: - master - develop paths-ignore: - - '**.md' - - '**.pdf' - - '**.tex' - - '**.jpg' - - '**.jpeg' - - '**.png' - - '**.bbl' - - '**.bib' - - 'doc/**.dat' - - 'doc/**.ipynb' - - 'doc/**.py' - - 'doc/**.sh' - - 'doc/**.xlsx' - - '.hpc/**' + - "**.md" + - "**.pdf" + - "**.tex" + - "**.jpg" + - "**.jpeg" + - "**.png" + - "**.bbl" + - "**.bib" + - "doc/**.dat" + - "doc/**.ipynb" + - "doc/**.py" + - "doc/**.sh" + - "doc/**.xlsx" + - ".hpc/**" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -45,7 +45,6 @@ jobs: name: Check format runs-on: ubuntu-latest steps: - - name: Checkout MF6 uses: actions/checkout@v4 @@ -65,7 +64,7 @@ jobs: - name: Check python format run: pixi run check-python-format - + - name: Check CITATION.cff uses: dieghernan/cff-validator@v3 @@ -76,10 +75,9 @@ jobs: FC: gfortran FC_V: 13 steps: - - name: Checkout MF6 uses: actions/checkout@v4 - + - name: Setup ${{ env.FC }} ${{ env.FC_V }} uses: fortran-lang/setup-fortran@v1 with: @@ -118,7 +116,7 @@ jobs: uses: actions/checkout@v4 with: path: modflow6 - + - name: Checkout test-drive uses: actions/checkout@v4 with: @@ -158,7 +156,7 @@ jobs: if: failure() working-directory: modflow6 run: cat builddir/meson-logs/meson-log.txt - + - name: Unit test MF6 working-directory: modflow6 run: pixi run test builddir @@ -229,13 +227,13 @@ jobs: with: repository: MODFLOW-USGS/modflow6-testmodels path: modflow6-testmodels - + - name: Checkout examples uses: actions/checkout@v4 with: repository: MODFLOW-USGS/modflow6-examples path: modflow6-examples - + - name: Setup ${{ env.FC }} ${{ env.FC_V }} uses: fortran-lang/setup-fortran@v1 with: @@ -277,7 +275,7 @@ jobs: if: failure() working-directory: modflow6 run: cat builddir/meson-logs/meson-log.txt - + - name: Unit test MF6 working-directory: modflow6 run: pixi run test builddir @@ -311,7 +309,7 @@ jobs: fi pixi run autotest -m "$markers" -k "$filters" - + - name: Install executables if: runner.os == 'Linux' uses: modflowpy/install-modflow-action@v1 @@ -332,7 +330,7 @@ jobs: with: name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} path: modflow6/autotest/.failed - + - name: Checkout usgslatex if: runner.os == 'Linux' uses: actions/checkout@v4 @@ -354,7 +352,7 @@ jobs: if: runner.os == 'Linux' working-directory: usgslatex/usgsLaTeX run: sudo ./install.sh --all-users - + - name: Test distribution scripts working-directory: modflow6 env: @@ -379,7 +377,6 @@ jobs: run: shell: bash steps: - - name: Free disk space (Ubuntu) if: runner.os == 'Linux' uses: jlumbroso/free-disk-space@main @@ -402,7 +399,7 @@ jobs: with: repository: MODFLOW-USGS/modflow6-testmodels path: modflow6-testmodels - + - name: Checkout examples uses: actions/checkout@v4 with: @@ -478,7 +475,7 @@ jobs: cp bin/libmf6.so ~/.local/bin/modflow/ cd ../modflow6-examples/autotest pytest -v -n auto test_scripts.py - + - name: Upload failed test output if: failure() uses: actions/upload-artifact@v4 @@ -491,7 +488,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} run: pixi run test-dist-scripts - + parallel_test: name: Parallel testing needs: @@ -502,13 +499,12 @@ 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 - - steps: + steps: - name: Checkout MF6 uses: actions/checkout@v4 with: @@ -564,13 +560,12 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, macos-13 ] + os: [ubuntu-22.04, macos-13] defaults: run: shell: bash steps: - - name: Checkout MF6 uses: actions/checkout@v4 with: diff --git a/doc/ReleaseNotes/develop.tex b/doc/ReleaseNotes/develop.tex index daa968dc50f..4976fe454a3 100644 --- a/doc/ReleaseNotes/develop.tex +++ b/doc/ReleaseNotes/develop.tex @@ -44,6 +44,8 @@ \item A new option RELEASE\_TIME\_FREQUENCY was added to the PRT model's particle release point (PRP) package. This option configures release times on a regular interval for the duration of the simulation, with the first release at the simulation start time. The PRP package's release schedule is the union of times configured via RELEASE\_TIME\_FREQUENCY, the RELEASETIMES block, and period block release settings, up to the tolerance mentioned in the previous item. If none of these are provided, a single release time is configured at the beginning of the first stress period's first time step. (A related bug has also been fixed which erroneously activated this default when user-specified release times were configured.) \item The PRT model's particle release point (PRP) package's FRACTION period-block release time setting has been removed. Period-block release settings can now be used only to release particles at the beginning of specified time steps, as is the case for period-block timing settings in the output control (OC) packages for all models. For fine control over release timing, specify times explicitly using the RELEASETIMES block. \item The Stress Package Concentration (SPC) utility available with the SSM Package is now the referred to as the Stress Package Component utility in the MF6IO guide. Additionally, some relatively minor refactoring of the code facilitates use of the SPC utility with the GWE model type so that TEMPERATURE arrays may be read by the utility. The SPC acronym was maintained to preserve backward compatibility. + \item The GWF-GWF Exchange has been fixed to support the configuration of the Mover package (MVR) also in cases where the number of exchanges equals zero (NEXG = 0). In earlier versions this has caused MODFLOW to terminate with an error. + \end{itemize} %\underline{INTERNAL FLOW PACKAGES} diff --git a/src/Model/ModelUtilities/Connections.f90 b/src/Model/ModelUtilities/Connections.f90 index 14f1c08e64b..e2bb2755248 100644 --- a/src/Model/ModelUtilities/Connections.f90 +++ b/src/Model/ModelUtilities/Connections.f90 @@ -93,14 +93,16 @@ subroutine con_da(this) ! ! -- Arrays call mem_deallocate(this%ia) - call mem_deallocate(this%ja) - call mem_deallocate(this%isym) - call mem_deallocate(this%jas) - call mem_deallocate(this%hwva) - call mem_deallocate(this%anglex) - call mem_deallocate(this%ihc) - call mem_deallocate(this%cl1) - call mem_deallocate(this%cl2) + if (size(this%ja) > 0) then + call mem_deallocate(this%ja) + call mem_deallocate(this%isym) + call mem_deallocate(this%jas) + call mem_deallocate(this%hwva) + call mem_deallocate(this%anglex) + call mem_deallocate(this%ihc) + call mem_deallocate(this%cl1) + call mem_deallocate(this%cl2) + end if end subroutine con_da !> @brief Allocate scalars for ConnectionsType