Bolt.jl icon indicating copy to clipboard operation
Bolt.jl copied to clipboard

Code not working with Julia 1.10

Open franyancr opened this issue 1 year ago • 4 comments

It seems that recent updates to Julia and some of its common packages have broken some part of the code, rendering it unusable. I encountered the error while running basic_usage.jl. It seems that the error is originating from the DiffEqBase package, with error:


ERROR: LoadError: MethodError: anyeltypedual(::Type{Union{}}) is ambiguous.

Candidates: anyeltypedual(::Type{T}) where T<:ForwardDiff.Dual @ DiffEqBase ~/.julia/packages/DiffEqBase/4084R/src/forwarddiff.jl:147 anyeltypedual(x::Type{T}) where T<:ForwardDiff.AbstractConfig @ DiffEqBase ~/.julia/packages/DiffEqBase/4084R/src/forwarddiff.jl:120 anyeltypedual(::Type{T}) where T<:(Tuple{Vararg{T, N}} where {N, T}) @ DiffEqBase ~/.julia/packages/DiffEqBase/4084R/src/forwarddiff.jl:166 anyeltypedual(::Type{T}) where T<:Union{Set, AbstractArray} @ DiffEqBase ~/.julia/packages/DiffEqBase/4084R/src/forwarddiff.jl:151

Possible fix, define anyeltypedual(::Type{Union{}})

Two of my students are getting the same exact error, so it is not something special about my local installation. I am running julia 1.10.1 on MacOS 11.7.4. Reverting to Julia 1.8 fixes the issue, so it indicates that it has to do with some recent updates.

franyancr avatar Mar 07 '24 21:03 franyancr

Hi @franyancr - thanks for pointing this out! I'll take a look at this in the next few days and see if I can't get this working for 1.10.1 on my laptop

jmsull avatar Mar 07 '24 22:03 jmsull

Thanks @franyancr, I'll get this sorted soon. I've been on 1.10 for a while, but @jmsull and I have been tinkering in a separate repository for some reverse-mode AD work.

xzackli avatar Mar 14 '24 05:03 xzackli

I am not able to reproduce this error in v1.10.1 - on my laptop I am able to run basic_usage.jl with no problems on the main branch on Julia v1.10.1. Later will try v1.10.0 to see if I can reproduce it, but you might just try upgrading?

jmsull avatar Apr 02 '24 17:04 jmsull

Sorry @franyancr, I made a versioning mistake before, but can reproduce this now, we have identified the problem (with the Forward-mode AD in the RECFAST solver) and are working on fixing it

jmsull avatar Apr 30 '24 17:04 jmsull