Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

using JETTest errors out on nightly (macOS) #10

Open
carlocab opened this issue Sep 15, 2021 · 1 comment
Open

using JETTest errors out on nightly (macOS) #10

carlocab opened this issue Sep 15, 2021 · 1 comment

Comments

@carlocab
Copy link

Here's the stacktrace:

./jlmnt/Julia-1.8.app/Contents/Resources/julia/bin/julia --startup-file=no
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0-DEV.539 (2021-09-15)
 _/ |\__'_|_|_|\__'_|  |  Commit 72425df7ff (0 days old master)
|__/                   |

(v1.8) pkg> activate --temp
  Activating new project at `/var/folders/kb/pf4wbfc512z47l56g5072l900000gn/T/jl_2kp67o`

(jl_2kp67o) pkg> add JETTest
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `/private/var/folders/kb/pf4wbfc512z47l56g5072l900000gn/T/jl_2kp67o/Project.toml`
 [a79fb612] + JETTest v0.1.4
    Updating `/private/var/folders/kb/pf4wbfc512z47l56g5072l900000gn/T/jl_2kp67o/Manifest.toml`
 [da1fd8a2] + CodeTracking v1.0.6
 [c3a54625] + JET v0.4.6
 [a79fb612] + JETTest v0.1.4
 [aa1ae85d] + JuliaInterpreter v0.8.21
 [6f1432cf] + LoweredCodeUtils v2.1.2
 [1914dd2f] + MacroTools v0.5.8
 [bac558e1] + OrderedCollections v1.4.1
 [ae029012] + Requires v1.1.3
 [295af30f] + Revise v3.1.19
 [0dad84c5] + ArgTools v1.1.1
 [56f22d72] + Artifacts
 [2a0f44e3] + Base64
 [ade2ca70] + Dates
 [8ba89e20] + Distributed
 [f43a241f] + Downloads v1.5.1
 [7b1f6079] + FileWatching
 [b77e0a4c] + InteractiveUtils
 [b27032c2] + LibCURL v0.6.3
 [76f85450] + LibGit2
 [8f399da3] + Libdl
 [56ddb016] + Logging
 [d6f4376e] + Markdown
 [ca575930] + NetworkOptions v1.2.0
 [44cfe95a] + Pkg v1.8.0
 [de0858da] + Printf
 [3fa0cd96] + REPL
 [9a3f8284] + Random
 [ea8e919c] + SHA
 [9e88b42a] + Serialization
 [6462fe0b] + Sockets
 [fa267f1f] + TOML v1.0.0
 [a4e569a6] + Tar v1.10.0
 [8dfed614] + Test
 [cf7118a7] + UUIDs
 [4ec0a83e] + Unicode
 [deac9b47] + LibCURL_jll v7.73.0+4
 [29816b5a] + LibSSH2_jll v1.9.1+2
 [c8ffd9c3] + MbedTLS_jll v2.24.0+2
 [14a3606d] + MozillaCACerts_jll v2020.7.22
 [83775a58] + Zlib_jll v1.2.12+1
 [8e850ede] + nghttp2_jll v1.41.0+1
 [3f19e933] + p7zip_jll v16.2.1+1
Precompiling project...
  ✗ JET
  ✗ JETTest
  0 dependencies successfully precompiled in 11 seconds (10 already precompiled)
  2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

julia> using JETTest
[ Info: Precompiling JETTest [a79fb612-4a80-4749-a9bd-c2faab13da61]
ERROR: LoadError: MethodError: no method matching Core.Compiler.OptimizationParams(; inlining=true, inline_cost_threshold=100, inline_nonleaf_penalty=1000, inline_tupleret_bonus=250, inline_error_path_cost=20, max_methods=3, tuple_splat=32, union_splitting=4, unoptimize_throw_blocks=true)
Closest candidates are:
  Core.Compiler.OptimizationParams(; inlining, inline_cost_threshold, inline_nonleaf_penalty, inline_tupleret_bonus, inline_error_path_cost, max_methods, tuple_splat, union_splitting) at compiler/types.jl:56 got unsupported keyword argument "unoptimize_throw_blocks"
  Core.Compiler.OptimizationParams(::Core.Compiler.NativeInterpreter) at compiler/types.jl:180 got unsupported keyword arguments "inlining", "inline_cost_threshold", "inline_nonleaf_penalty", "inline_tupleret_bonus", "inline_error_path_cost", "max_methods", "tuple_splat", "union_splitting", "unoptimize_throw_blocks"
Stacktrace:
  [1] kwerr(kw::NamedTuple{(:inlining, :inline_cost_threshold, :inline_nonleaf_penalty, :inline_tupleret_bonus, :inline_error_path_cost, :max_methods, :tuple_splat, :union_splitting, :unoptimize_throw_blocks), Tuple{Bool, Int64, Int64, Int64, Int64, Int64, Int64, Int64, Bool}}, args::Type)
    @ Core.Compiler ./error.jl:163
  [2] JETOptimizationParams(; inlining::Bool, inline_cost_threshold::Int64, inline_nonleaf_penalty::Int64, inline_tupleret_bonus::Int64, inline_error_path_cost::Int64, max_methods::Int64, tuple_splat::Int64, union_splitting::Int64, unoptimize_throw_blocks::Bool, __jetconfigs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ JET ~/.julia/packages/JET/hidRI/src/analyzer.jl:121
  [3] JETOptimizationParams()
    @ JET ~/.julia/packages/JET/hidRI/src/analyzer.jl:121
  [4] top-level scope
    @ ~/.julia/packages/JET/hidRI/src/analyzer.jl:134
  [5] include(mod::Module, _path::String)
    @ Base ./Base.jl:416
  [6] include(x::String)
    @ JET ~/.julia/packages/JET/hidRI/src/JET.jl:1
  [7] top-level scope
    @ ~/.julia/packages/JET/hidRI/src/JET.jl:502
  [8] include
    @ ./Base.jl:416 [inlined]
  [9] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1329
 [10] top-level scope
    @ none:1
 [11] eval
    @ ./boot.jl:368 [inlined]
 [12] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [13] top-level scope
    @ none:1
in expression starting at /Users/carlocab/.julia/packages/JET/hidRI/src/analyzer.jl:134
in expression starting at /Users/carlocab/.julia/packages/JET/hidRI/src/JET.jl:1
ERROR: LoadError: Failed to precompile JET [c3a54625-cd67-489e-a8e7-0a5a0ff4e31b] to /Users/carlocab/.julia/compiled/v1.8/JET/jl_ybttI9.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1477
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1421
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1131
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1024
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1008
  [7] include
    @ ./Base.jl:416 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1329
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:368 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /Users/carlocab/.julia/packages/JETTest/sQ59v/src/JETTest.jl:1
ERROR: Failed to precompile JETTest [a79fb612-4a80-4749-a9bd-c2faab13da61] to /Users/carlocab/.julia/compiled/v1.8/JETTest/jl_H5ToBs.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1477
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1421
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1131
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1024
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1008

This is the latest nightly downloaded from https://julialang.org.

I have a slightly older nightly build that doesn't produce this error upon doing using JETTest (built from JuliaLang/julia@d0d895e92e), but trying to do anything (e.g. @report_dispatch) returns a MethodError:

julia> @report_dispatch foo(1)
ERROR: MethodError: no method matching Core.Compiler.InferenceState(::Core.Compiler.InferenceResult, ::Bool, ::Core.Compiler.AbstractInterpreter)
Closest candidates are:
  Core.Compiler.InferenceState(::Core.Compiler.InferenceResult, ::Bool, ::JET.AbstractAnalyzer) at /Users/carlocab/.julia/packages/JET/hidRI/src/JET.jl:877
  Core.Compiler.InferenceState(::Core.Compiler.InferenceResult, ::Symbol, ::Core.Compiler.AbstractInterpreter) at compiler/inferencestate.jl:226
  Core.Compiler.InferenceState(::Core.Compiler.InferenceResult, ::Core.CodeInfo, ::Symbol, ::Core.Compiler.AbstractInterpreter) at compiler/inferencestate.jl:55
Stacktrace:
  [1] InferenceState
    @ ~/.julia/packages/JET/hidRI/src/JET.jl:879 [inlined]
  [2] analyze_method_instance!(analyzer::JETTest.DispatchAnalyzer{JETTest.var"#4#8", JETTest.var"#5#9"}, mi::Core.MethodInstance)
    @ JET ~/.julia/packages/JET/hidRI/src/JET.jl:871
  [3] analyze_method_signature!(analyzer::JETTest.DispatchAnalyzer{JETTest.var"#4#8", JETTest.var"#5#9"}, m::Method, atype::Any, sparams::Core.SimpleVector)
    @ JET ~/.julia/packages/JET/hidRI/src/JET.jl:865
  [4] analyze_gf_by_type!
    @ ~/.julia/packages/JET/hidRI/src/JET.jl:839 [inlined]
  [5] analyze_call(tt::Type{<:Tuple}; analyzer::Type{JETTest.DispatchAnalyzer}, jetconfigs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ JET ~/.julia/packages/JET/hidRI/src/JET.jl:962
  [6] analyze_call(f::Any, types::Any; kwargs::Base.Pairs{Symbol, UnionAll, Tuple{Symbol}, NamedTuple{(:analyzer,), Tuple{UnionAll}}})
    @ JET ~/.julia/packages/JET/hidRI/src/JET.jl:955
  [7] report_call(::Any, ::Vararg{Any}; jetconfigs::Base.Pairs{Symbol, UnionAll, Tuple{Symbol}, NamedTuple{(:analyzer,), Tuple{UnionAll}}})
    @ JET ~/.julia/packages/JET/hidRI/src/JET.jl:990
  [8] report_dispatch(::Any, ::Vararg{Any}; analyzer::Type, jetconfigs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ JETTest ~/.julia/packages/JETTest/sQ59v/src/dispatch.jl:303
  [9] report_dispatch(::Any, ::Vararg{Any})
    @ JETTest ~/.julia/packages/JETTest/sQ59v/src/dispatch.jl:302
 [10] top-level scope
    @ REPL[5]:1

This second error might be worth a separate issue, but I've included it here since it might help track down the first one.

@aviatesk
Copy link
Owner

I'm going to deprecate this package from the next JET.jl minor release.

For now, please checkout to the latest master of JET.jl and use @report_opt: https://aviatesk.github.io/JET.jl/dev/optanalysis/

That should work on nightly and should run faster and more reliably than JETTest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants