-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Can't index into a Dict{Int,Type} after running BaseBenchmarks.loadall!() #21028
Comments
What's your version? |
Ok, seems I made a mistake, seems that is #20720 which would break this (weirdly enough that doesn't touches inference). |
be sure to add a test for that? |
On 1820efa, if I do d = Dict{Int,Type}()
d[1] = Int everything works, but if do (on a fresh REPL) using BaseBenchmarks
BaseBenchmarks.loadall!() # this fails setindex!-ing a Dict{Int,Type}
d = Dict{Int,Type}()
d[1] = Int the last one fails here |
Could you post the error, or whatever output there is? |
julia> using BaseBenchmarks
julia> BaseBenchmarks.loadall!()
loading group "string"...done (took 0.588424233 seconds)
loading group "linalg"...WARNING: filter(flt, itr) is deprecated, use Iterators.filter(flt, itr) instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at ./deprecated.jl:64
[2] filter(::Function, ::NTuple{7,UnionAll}) at ./deprecated.jl:51
[3] include_from_node1(::String) at ./loading.jl:539
[4] include(::String) at ./sysimg.jl:14
[5] #load!#2(::Bool, ::Function, ::BenchmarkTools.BenchmarkGroup, ::String) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:39
[6] (::BaseBenchmarks.#kw##load!)(::Array{Any,1}, ::BaseBenchmarks.#load!, ::BenchmarkTools.BenchmarkGroup, ::String) at ./<missing>:0
[7] #loadall!#6(::Bool, ::Bool, ::Function, ::BenchmarkTools.BenchmarkGroup) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:53
[8] #loadall!#5(::Array{Any,1}, ::Function) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:48
[9] loadall!() at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:48
[10] eval(::Module, ::Any) at ./boot.jl:235
[11] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
[12] macro expansion at ./REPL.jl:97 [inlined]
[13] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
while loading /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/linalg/LinAlgBenchmarks.jl, in expression starting on line 16
done (took 11.765382401 seconds)
loading group "parallel"...done (took 0.104855176 seconds)
loading group "tuple"...done (took 2.974122399 seconds)
loading group "dates"...done (took 2.038936224 seconds)
loading group "micro"...done (took 0.517584081 seconds)
loading group "io"...done (took 0.570476438 seconds)
loading group "scalar"...done (took 29.934090327 seconds)
loading group "sparse"...done (took 5.464621647 seconds)
loading group "broadcast"...done (took 1.510048523 seconds)
loading group "simd"...done (took 2.550524409 seconds)
loading group "problem"...
WARNING: deprecated syntax "typealias IMDBGraph Dict{UTF8String,IMDBNode}" at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/problem/IMDBGraphs.jl:15.
Use "const IMDBGraph = Dict{UTF8String,IMDBNode}" instead.
WARNING: deprecated syntax "abstract Scene" at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/problem/Raytracer.jl:41.
Use "abstract type Scene end" instead.
done (took 1.996170801 seconds)
loading group "array"...
WARNING: deprecated syntax "abstract MyArray{T,N}<:AbstractArray{T,N}" at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/array/sumindex.jl:199.
Use "abstract type MyArray{T,N}<:AbstractArray{T,N} end" instead.
WARNING: Base.linearindexing is deprecated, use Base.IndexStyle instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/array/sumindex.jl:263
WARNING: Partial linear indexing is deprecated. Use `reshape(A, Val{2})` to make the dimensionality of the array match the number of indices.
Stacktrace:
[1] partial_linear_indexing_warning_lookup(::Int64) at ./deprecated.jl:1050
[2] checkbounds_linear_indices at ./abstractarray.jl:402 [inlined]
[3] checkbounds_indices at ./abstractarray.jl:395 [inlined]
[4] checkbounds_indices at ./abstractarray.jl:381 [inlined]
[5] checkbounds at ./abstractarray.jl:334 [inlined]
[6] checkbounds(::SubArray{Int32,3,Array{Int32,3},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}},true}, ::Base.Slice{Base.OneTo{Int64}}, ::UnitRange{Int64}) at ./abstractarray.jl:354
[7] view(::SubArray{Int32,3,Array{Int32,3},Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}},true}, ::Colon, ::Vararg{Any,N} where N) at ./subarray.jl:113
[8] makearrays(::Type{Int32}, ::Int64, ::Int64) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/array/sumindex.jl:298
[9] include_from_node1(::String) at ./loading.jl:539
[10] include(::String) at ./sysimg.jl:14
[11] #load!#2(::Bool, ::Function, ::BenchmarkTools.BenchmarkGroup, ::String) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:39
[12] (::BaseBenchmarks.#kw##load!)(::Array{Any,1}, ::BaseBenchmarks.#load!, ::BenchmarkTools.BenchmarkGroup, ::String) at ./<missing>:0
[13] #loadall!#6(::Bool, ::Bool, ::Function, ::BenchmarkTools.BenchmarkGroup) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:53
[14] #loadall!#5(::Array{Any,1}, ::Function) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:48
[15] loadall!() at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:48
[16] eval(::Module, ::Any) at ./boot.jl:235
[17] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
[18] macro expansion at ./REPL.jl:97 [inlined]
[19] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
while loading /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/array/ArrayBenchmarks.jl, in expression starting on line 47
done (took 30.402400938 seconds)
loading group "misc"...done (took 1.779329819 seconds)
loading group "sort"...done (took 3.917152019 seconds)
loading group "nullable"...WARNING: Base.linearindexing is deprecated, use Base.IndexStyle instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:56
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
WARNING: Base.LinearFast is deprecated, use Base.IndexLinear instead.
likely near /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/nullable/NullableBenchmarks.jl:85
done (took 7.701400756 seconds)
loading group "shootout"...
WARNING: deprecated syntax "abstract BTree" at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/shootout/binary_trees.jl:8.
Use "abstract type BTree end" instead.
done (took 0.947569795 seconds)
ERROR: MethodError: First argument to `convert` must be a Type, got V
Stacktrace:
[1] setindex!(::Dict{Int64,Type}, ::Type, ::Int64) at ./dict.jl:420
[2] setindex!(::Dict{Int64,Type}, ::Type{T} where T, ::UInt64) at ./dict.jl:416
[3] jldatatype(::JLD.JldFile, ::HDF5.HDF5Datatype) at /home/pabloferz/.julia/v0.6/JLD/src/jld_types.jl:754
[4] read(::JLD.JldDataset) at /home/pabloferz/.julia/v0.6/JLD/src/JLD.jl:385
[5] read(::JLD.JldFile, ::String) at /home/pabloferz/.julia/v0.6/JLD/src/JLD.jl:361
[6] (::BaseBenchmarks.##7#8{BenchmarkTools.BenchmarkGroup})(::JLD.JldFile) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:59
[7] #jldopen#11(::Array{Any,1}, ::Function, ::BaseBenchmarks.##7#8{BenchmarkTools.BenchmarkGroup}, ::String, ::Vararg{String,N} where N) at /home/pabloferz/.julia/v0.6/JLD/src/JLD.jl:260
[8] #loadall!#6(::Bool, ::Bool, ::Function, ::BenchmarkTools.BenchmarkGroup) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:57
[9] #loadall!#5(::Array{Any,1}, ::Function) at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:48
[10] loadall!() at /home/pabloferz/.julia/v0.6/BaseBenchmarks/src/BaseBenchmarks.jl:48 |
|
Also, |
So far I have found that It doesn't alway causes the problem and the only way I have found so far to trigger it is by calling using BaseBenchmarks
BaseBenchmarks.load!("shootout") |
Just saw that this issue existed, so I'll paste my previous comment here: Here's the stacktrace in the logs, which points to here. From the error message, it seems like julia> convert(TypeVar(:V), 1)
ERROR: MethodError: First argument to `convert` must be a Type, got V AFIAK, |
Here's a simplified repro julia> using BaseBenchmarks
julia> file = JLD.jldopen(BaseBenchmarks.PARAMS_PATH, "r")
julia> obj = file["shootout"]
julia> par = HDF5.file(obj)
julia> T = JLD.julia_type("BenchmarkTools.BenchmarkGroup")
julia> dtype = HDF5.datatype(obj.plain)
julia> addr = HDF5.objinfo(dtype).addr
julia> par.h5jltype[addr] = T
ERROR: MethodError: First argument to `convert` must be a Type, got V
Stacktrace:
[1] setindex!(::Dict{Int64,Type}, ::Type, ::Int64) at ./dict.jl:420
[2] setindex!(::Dict{Int64,Type}, ::Type{T} where T, ::UInt64) at ./dict.jl:416 |
Even smaller julia> using BaseBenchmarks
julia> file = JLD.jldopen(BaseBenchmarks.PARAMS_PATH, "r")
julia> par = HDF5.file(file["shootout"])
julia> par.h5jltype[1] = Int
ERROR: MethodError: First argument to `convert` must be a Type, got V
Stacktrace:
[1] setindex!(::Dict{Int64,Type}, ::Type, ::Int64) at ./dict.jl:420 |
I have a fix for this. |
fix #21028, static parameter value incorrectly set to typevar
This issue was caused by 6fb2c67.
In the last couple of days something broke the following
this in turns breaks
JLD
andBenchmarkTools
The text was updated successfully, but these errors were encountered: