Skip to content

test_multi_model fails on macOS, the transport comparison exceeds its tolerance #2828

Description

@jdhughes-dev

test_multi_model fails on macOS. The transport comparison at
autotest/test_model_splitter.py:1481 sums the absolute difference between the original and
reconstructed concentrations over the whole array and compares the sum with a constant:

            diff = np.abs(X_split - X)
            diff = np.nansum(diff)
            if diff > 10.25:
                raise AssertionError(
                    f"Difference between output arrays: "
                    f"{diff:.2f} greater than tolerance"
                )

Observed:

where result
macOS, python 3.11, 3.12, 3.13, 3.14 (run) 12.47, fails
ubuntu, nightly optional dependency build (run) passes
macOS, local 13.42, fails

The GWF comparison in the same test uses assert_allclose and passes; only the GWT and GWE
branch fails.

The test has not run on a pull request on any platform, because the Test job installs FloPy
with --no-deps into the MODFLOW 6 pixi environment and pymetis is not in it. It surfaced
while adding the optional dependencies to that job in #2822, where pymetis is now held back
until this is resolved.

Two things worth separating when this is picked up:

  • Whether the difference is a real defect in splitting a GWF-GWT simulation, or the ordinary
    platform to platform variation of the transport solution.
  • The criterion itself. A sum of absolute differences over every cell compared with a
    hard-coded constant grows with the size of the array and with the number of cells that
    differ slightly, so it does not state a tolerance a reader can check. A per-cell measure,
    or a tighter solver in the test model, would say what is actually being required.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions