Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SparseConnectivityTracer: non-boolean used in boolean context #1883

Closed
visr opened this issue Oct 8, 2024 · 1 comment · Fixed by #1890
Closed

SparseConnectivityTracer: non-boolean used in boolean context #1883

visr opened this issue Oct 8, 2024 · 1 comment · Fixed by #1890
Labels
core Issues related to the computational core in Julia

Comments

@visr
Copy link
Member

visr commented Oct 8, 2024

I just saw this randomly pop up in an unrelated PR: https://github.com/Deltares/Ribasim/actions/runs/11237297981/job/31239411451?pr=1881#step:5:629

ERROR: LoadError: TypeError: non-boolean (SparseConnectivityTracer.GradientTracer{SparseConnectivityTracer.IndexSetGradientPattern{Int64, BitSet}}) used in boolean context
Stacktrace:
  [1] clamp(x::SparseConnectivityTracer.GradientTracer{SparseConnectivityTracer.IndexSetGradientPattern{Int64, BitSet}}, lo::Float64, hi::Float64)
    @ Base ./intfuncs.jl:1266
  [2] formulate_flow!
    @ Ribasim ~/work/Ribasim/Ribasim/core/src/solve.jl:668

Strange because main is green. Is this non-deterministic? Doesn't seem like it, #1882 now also hits it.

@github-project-automation github-project-automation bot moved this to To do in Ribasim Oct 8, 2024
@visr visr added core Issues related to the computational core in Julia bug labels Oct 8, 2024
visr added a commit that referenced this issue Oct 8, 2024
This reverts commit 7e28034.
Hoping to fix #1883.
visr added a commit that referenced this issue Oct 8, 2024
We have

```
install-julia = "juliaup add 1.10.5 && juliaup override unset && juliaup override set 1.10.5"
```

But in #1883 we can see (@evetion can see) that the Julia tests are still run using Julia 1.11, which is the new stable release that came out today.

Rather than trying to find out what exactly goes wrong with the override, this just sets it when we start julia, so we can release.
@visr
Copy link
Member Author

visr commented Oct 8, 2024

@evetion noticed the Julia tests were running the just released julia 1.11.0. I made #1889 to address that. Testing locally with 1.11 and an updated Manifest.toml I can reproduce the issue running e.g. the HWS model. Might need fixing in https://github.com/adrhill/SparseConnectivityTracer.jl since it is surprising that clamp doesn't work.

visr added a commit that referenced this issue Oct 8, 2024
This allowed it to pick up Julia 1.11, leading to #1883.
@visr visr closed this as completed in #1890 Oct 8, 2024
visr pushed a commit that referenced this issue Oct 8, 2024
@github-project-automation github-project-automation bot moved this from To do to ✅ Done in Ribasim Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues related to the computational core in Julia
Projects
Archived in project
1 participant