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

Fixes for ComponentArrays 0.15.23 #2028

Closed
visr opened this issue Feb 2, 2025 · 1 comment · Fixed by #2049
Closed

Fixes for ComponentArrays 0.15.23 #2028

visr opened this issue Feb 2, 2025 · 1 comment · Fixed by #2049
Labels
core Issues related to the computational core in Julia dependencies Pull requests that update a dependency file tech-debt Improvements related to technical debt test Relates to unit testing

Comments

@visr
Copy link
Member

visr commented Feb 2, 2025

In #2027 I had to hold back the latest ComponentArrays version that has this PR: SciML/ComponentArrays.jl#249.

It gave errors like:

ERROR: LoadError: MethodError: Cannot `convert` an object of type ComponentArrays.ComponentIndex{Int64, ComponentArrays.NullAxis} to an object of type Int64

Closest candidates are:
  convert(::Type{T}, !Matched::VectorizationBase.AbstractSIMD) where T<:Union{Bool, Float16, Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8, SIMDTypes.Bit}
   @ VectorizationBase ~/.julia/packages/VectorizationBase/wHnQd/src/base_defs.jl:201
  convert(::Type{T}, !Matched::SentinelArrays.ChainedVectorIndex) where T<:Union{Signed, Unsigned}
   @ SentinelArrays ~/.julia/packages/SentinelArrays/vt8A6/src/chainedvector.jl:262
  convert(::Type{<:Real}, !Matched::T) where T<:SparseConnectivityTracer.AbstractTracer
   @ SparseConnectivityTracer ~/.julia/packages/SparseConnectivityTracer/zXLIF/src/overloads/conversion.jl:10
  ...

Stacktrace:
  [1] get_state_index(u::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(tabulated_rating_curve = ViewAxis(1:0, Shaped1DAxis((0,))), pump = ViewAxis(1:1, Shaped1DAxis((1,))), outlet = ViewAxis(2:4, Shaped1DAxis((3,))), user_demand_inflow = ViewAxis(5:7, Shaped1DAxis((3,))), user_demand_outflow = ViewAxis(8:10, Shaped1DAxis((3,))), linear_resistance = ViewAxis(11:10, Shaped1DAxis((0,))), manning_resistance = ViewAxis(11:10, Shaped1DAxis((0,))), evaporation = ViewAxis(11:13, Shaped1DAxis((3,))), infiltration = ViewAxis(14:16, Shaped1DAxis((3,))), integral = ViewAxis(17:16, Shaped1DAxis((0,))))}}}, link::Tuple{Ribasim.NodeID, Ribasim.NodeID})
    @ Ribasim ~/work/Ribasim/Ribasim/core/src/util.jl:1052

We should look into fixing Ribasim to work with this, assuming this is intended behavior.

@visr visr added core Issues related to the computational core in Julia dependencies Pull requests that update a dependency file test Relates to unit testing labels Feb 2, 2025
@github-project-automation github-project-automation bot moved this to To do in Ribasim Feb 2, 2025
@visr visr added the tech-debt Improvements related to technical debt label Feb 3, 2025
@visr
Copy link
Member Author

visr commented Feb 3, 2025

In discussing with @SouthEndMusic another option may be to try using our own struct of arrays for u and use https://github.com/JuliaArrays/LazyArrays.jl for the operations where u needs to be considered a single vector. Or perhaps something else based on Memory would work, just like https://github.com/JuliaArrays/FixedSizeArrays.jl is based on that.

visr added a commit that referenced this issue Feb 3, 2025
We had this earlier with #1914 but that still missed a bugfix that made
package installation more fragile with our antivirus. This switches to
the latest release 1.11.3 that has those fixes.

Since we don't officially support running from Julia this directly
requires 1.11 as the minimum version. I also directly use the new
entrypoint marking.

Somewhat unrelated, but I ran ExplicitImports again and found that we
don't use a bunch of names, so I removed those.

This also sets compat to avoid pulling in ComponentArrays v0.15.23, see
#2028.
visr added a commit that referenced this issue Feb 10, 2025
@visr visr closed this as completed in 029dcf3 Feb 11, 2025
@github-project-automation github-project-automation bot moved this from To do to ✅ Done in Ribasim Feb 11, 2025
Hofer-Julian pushed a commit to Hofer-Julian/Ribasim that referenced this issue Feb 11, 2025
Fixes Deltares#1833

HWS output looks like this before, and no output after.
The `invalid_unstable` test model still logs though, as captured by
tests.

```

┌ Info: Convergence bottlenecks in descending order of severity:
│   Pump Deltares#2019 = NaN
│   Pump #2130 = NaN
│   Pump #2315 = NaN
│   Pump #2637 = NaN
│   Pump #3995 = NaN
│   Pump #4536 = NaN
│   Pump #6128 = NaN
│   Pump #6866 = NaN
│   Pump #9633 = NaN
│   Pump #10704 = NaN
│   Pump #10710 = NaN
│   Pump #10711 = NaN
│   Pump #10712 = NaN
│   Pump #10713 = NaN
│   Pump #10714 = NaN
│   Pump #10715 = NaN
│   Pump #10716 = NaN
│   Pump #10717 = NaN
│   Outlet #6692 = NaN
│   Outlet #7679 = NaN
│   Outlet #10702 = NaN
│   Outlet #10703 = NaN
│   UserDemand #1000015 = NaN
│   UserDemand #1000016 = NaN
│   UserDemand #1000017 = NaN
│   UserDemand #1000018 = NaN
│   UserDemand #1000019 = NaN
│   UserDemand #1000020 = NaN
│   UserDemand #1000021 = NaN
│   UserDemand #1000022 = NaN
│   UserDemand #1000038 = NaN
│   UserDemand #1000040 = NaN
│   UserDemand #1000042 = NaN
│   Basin Deltares#529 = NaN
│   Basin Deltares#670 = NaN
│   Basin Deltares#905 = NaN
│   Basin Deltares#1041 = NaN
│   Basin Deltares#1340 = NaN
│   Basin Deltares#1369 = NaN
│   Basin Deltares#1514 = NaN
│   Basin Deltares#1676 = NaN
│   Basin Deltares#1709 = NaN
│   Basin Deltares#1873 = NaN
│   Basin Deltares#2028 = NaN
│   Basin #2232 = NaN
│   Basin #2255 = NaN
│   Basin #2323 = NaN
│   Basin #2336 = NaN
│   Basin #2381 = NaN
│   Basin #2468 = NaN
│   Basin #2496 = NaN
│   Basin #2522 = NaN
│   Basin #2590 = NaN
│   Basin #2749 = NaN
│   Basin #2968 = NaN
│   Basin #3016 = NaN
│   Basin #3090 = NaN
│   Basin #3302 = NaN
│   Basin #3364 = NaN
│   Basin #3448 = NaN
│   Basin #3543 = NaN
│   Basin #3584 = NaN
│   Basin #3721 = NaN
│   Basin #3899 = NaN
│   Basin #4024 = NaN
│   Basin #4134 = NaN
│   Basin #4184 = NaN
│   Basin #4279 = NaN
│   Basin #4339 = NaN
│   Basin #4473 = NaN
│   Basin #4570 = NaN
│   Basin #4714 = NaN
│   Basin #4796 = NaN
│   Basin #4830 = NaN
│   Basin #4838 = NaN
│   Basin #5048 = NaN
│   Basin #5097 = NaN
│   Basin #5207 = NaN
│   Basin #5322 = NaN
│   Basin #5371 = NaN
│   Basin #5381 = NaN
│   Basin #5472 = NaN
│   Basin #5498 = NaN
│   Basin #5505 = NaN
│   Basin #5530 = NaN
│   Basin #5616 = NaN
│   Basin #5909 = NaN
│   Basin #5978 = NaN
│   Basin #5999 = NaN
│   Basin #6017 = NaN
│   Basin #6077 = NaN
│   Basin #6101 = NaN
│   Basin #6164 = NaN
│   Basin #6224 = NaN
│   Basin #6273 = NaN
│   Basin #6327 = NaN
│   Basin #6364 = NaN
│   Basin #6401 = NaN
│   Basin #6419 = NaN
│   Basin #6428 = NaN
│   Basin #6437 = NaN
│   Basin #6473 = NaN
│   Basin #6503 = NaN
│   Basin #6582 = NaN
│   Basin #6757 = NaN
│   Basin #6885 = NaN
│   Basin #6926 = NaN
│   Basin #6945 = NaN
│   Basin #6972 = NaN
│   Basin #7053 = NaN
│   Basin #7087 = NaN
│   Basin #7101 = NaN
│   Basin #7117 = NaN
│   Basin #7164 = NaN
│   Basin #7214 = NaN
│   Basin #7310 = NaN
│   Basin #7385 = NaN
│   Basin #7400 = NaN
│   Basin #7417 = NaN
│   Basin #7484 = NaN
│   Basin #7597 = NaN
│   Basin #7615 = NaN
│   Basin #7668 = NaN
│   Basin #7706 = NaN
│   Basin #7843 = NaN
│   Basin #7909 = NaN
│   Basin #8014 = NaN
│   Basin #8020 = NaN
│   Basin #8049 = NaN
│   Basin #8059 = NaN
│   Basin #8071 = NaN
│   Basin #8234 = NaN
│   Basin #8257 = NaN
│   Basin #8340 = NaN
│   Basin #8364 = NaN
│   Basin #8559 = NaN
│   Basin #8685 = NaN
│   Basin #8717 = NaN
│   Basin #8757 = NaN
│   Basin #8786 = NaN
│   Basin #8817 = NaN
│   Basin #8921 = NaN
│   Basin #9033 = NaN
│   Basin #9086 = NaN
│   Basin #9123 = NaN
│   Basin #9144 = NaN
│   Basin #9185 = NaN
│   Basin #9209 = NaN
│   Basin #9358 = NaN
│   Basin #9406 = NaN
│   Basin #9430 = NaN
│   Basin #9484 = NaN
│   Basin #9586 = NaN
│   Basin #9627 = NaN
│   Basin #9830 = NaN
│   Basin #9885 = NaN
│   Basin #9899 = NaN
│   Basin #9906 = NaN
│   Basin #9954 = NaN
│   Basin #10040 = NaN
│   Basin #10107 = NaN
│   Basin #10184 = NaN
│   Basin #10202 = NaN
│   Basin #10308 = NaN
│   Basin #10321 = NaN
│   Basin #10343 = NaN
│   Basin #10583 = NaN
│   Basin #10587 = NaN
│   Basin #10634 = NaN
└   Basin #10659 = NaN
```
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 dependencies Pull requests that update a dependency file tech-debt Improvements related to technical debt test Relates to unit testing
Projects
Status: Done
1 participant