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

@snoopi on master produces function that is undefined on 1.3 #45

Closed
chriselrod opened this issue Dec 3, 2019 · 3 comments
Closed

@snoopi on master produces function that is undefined on 1.3 #45

chriselrod opened this issue Dec 3, 2019 · 3 comments

Comments

@chriselrod
Copy link
Contributor

chriselrod commented Dec 3, 2019

I'm not sure how to simplify this into a minimal example.
Here are two examples in LoopVectorization and VectorizedRNG.jl using SnoopCompile v1.0.2. The former has an unrecognized keyword argument function, and the latter a generated function.

using Pkg
Pkg.add(PackageSpec(url="https://github.com/chriselrod/VectorizationBase.jl"))
Pkg.add(PackageSpec(url="https://github.com/chriselrod/SIMDPirates.jl"))
Pkg.add(PackageSpec(url="https://github.com/chriselrod/SLEEFPirates.jl"))
Pkg.add(PackageSpec(url="https://github.com/chriselrod/LoopVectorization.jl", rev="graph"))
Pkg.add(PackageSpec(url="https://github.com/chriselrod/VectorizedRNG.jl"))

If you have ideas on how to come up with a simpler example, please let me know.

On Julia 1.3:

julia> using VectorizedRNG
[ Info: Precompiling VectorizedRNG [33b4df10-0173-11e9-2a0c-851a7edac40e]
ERROR: LoadError: UndefVarError: ##s41#17 not defined
Stacktrace:
 [1] _precompile_() at /home/chriselrod/.julia/dev/VectorizedRNG/src/precompile.jl:4
 [2] top-level scope at /home/chriselrod/.julia/dev/VectorizedRNG/src/VectorizedRNG.jl:29
 [3] include at ./boot.jl:328 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1105
 [5] include(::Module, ::String) at ./Base.jl:31
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:330 [inlined]
 [8] eval(::Expr) at ./client.jl:425
 [9] top-level scope at ./none:3
in expression starting at /home/chriselrod/.julia/dev/VectorizedRNG/src/VectorizedRNG.jl:29
ERROR: Failed to precompile VectorizedRNG [33b4df10-0173-11e9-2a0c-851a7edac40e] to /home/chriselrod/.julia/compiled/v1.3/VectorizedRNG/wqLDZ_R5WJb.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917

julia> using LoopVectorization
[ Info: Precompiling LoopVectorization [bdcacae8-1622-11e9-2a5c-532679323890]
ERROR: LoadError: UndefVarError: #_vectorloads!##kw not defined
Stacktrace:
 [1] _precompile_() at /home/chriselrod/.julia/dev/LoopVectorization/src/precompile.jl:5
 [2] top-level scope at /home/chriselrod/.julia/dev/LoopVectorization/src/LoopVectorization.jl:699
 [3] include at ./boot.jl:328 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1105
 [5] include(::Module, ::String) at ./Base.jl:31
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:330 [inlined]
 [8] eval(::Expr) at ./client.jl:425
 [9] top-level scope at ./none:3
in expression starting at /home/chriselrod/.julia/dev/LoopVectorization/src/LoopVectorization.jl:699
ERROR: Failed to precompile LoopVectorization [bdcacae8-1622-11e9-2a5c-532679323890] to /home/chriselrod/.julia/compiled/v1.3/LoopVectorization/4TogI_R5WJb.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917

julia> versioninfo()
Julia Version 1.3.1-pre.0
Commit b42f4ab37f* (2019-11-26 17:58 UTC)
Platform Info:
  OS: Linux (x86_64-generic-linux)
  CPU: Intel(R) Core(TM) i9-9940X CPU @ 3.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.0 (ORCJIT, skylake)

julia> using Pkg; Pkg.status("VectorizedRNG")
    Status `~/.julia/environments/v1.3/Project.toml`
  [33b4df10] VectorizedRNG v0.1.0 [`~/.julia/dev/VectorizedRNG`]

julia> Pkg.status("LoopVectorization")
    Status `~/.julia/environments/v1.3/Project.toml`
  [bdcacae8] LoopVectorization v0.1.0 [`~/.julia/dev/LoopVectorization`]

On master:

julia> using VectorizedRNG

julia> using LoopVectorization

julia> versioninfo()
Julia Version 1.4.0-DEV.534
Commit e2cd1ff1e3* (2019-11-30 17:29 UTC)
Platform Info:
  OS: Linux (x86_64-generic-linux)
  CPU: Intel(R) Core(TM) i9-9940X CPU @ 3.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)

julia> using Pkg; Pkg.status("VectorizedRNG")
Status `~/.julia/environments/v1.4/Project.toml`
  [33b4df10] VectorizedRNG v0.1.0 [`~/.julia/dev/VectorizedRNG`]

julia> Pkg.status("LoopVectorization")
Status `~/.julia/environments/v1.4/Project.toml`
  [bdcacae8] LoopVectorization v0.1.0 [`~/.julia/dev/LoopVectorization`]

julia> dump(VectorizedRNG.var"##s41#17")
VectorizedRNG.var"##s41#17" <: Function

julia> dump(LoopVectorization.var"#_vectorloads!##kw")
LoopVectorization.var"#_vectorloads!##kw" <: Function

EDIT:
Julia master on a different computer, different commit (535 vs 545):

julia> using VectorizedRNG
[ Info: Precompiling VectorizedRNG [33b4df10-0173-11e9-2a0c-851a7edac40e]
ERROR: LoadError: UndefVarError: ##s40#188 not defined
Stacktrace:
 [1] _precompile_()
 [2] top-level scope at /home/username/.julia/dev/SIMDPirates/src/SIMDPirates.jl:71
 [3] include(::Module, ::String) at ./Base.jl:377
 [4] top-level scope at none:2
 [5] eval [inlined]
 [6] eval(::Expr) at ./client.jl:449
 [7] top-level scope
in expression starting at /home/username/.julia/dev/SIMDPirates/src/SIMDPirates.jl:71
ERROR: LoadError: Failed to precompile SIMDPirates [21efa798-c60a-11e8-04d3-e1a92915a26a] to /home/username/.julia/compiled/v1.4/SIMDPirates/jEO2E_tYj51.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1263
 [3] _require(::Base.PkgId) at ./loading.jl:1022
 [4] require(::Base.PkgId) at ./loading.jl:920
 [5] require(::Module, ::Symbol) at ./loading.jl:915
 [6] include(::Module, ::String) at ./Base.jl:377
 [7] top-level scope at none:2
 [8] eval [inlined]
 [9] eval(::Expr) at ./client.jl:449
 [10] top-level scope
in expression starting at /home/username/.julia/dev/VectorizedRNG/src/VectorizedRNG.jl:3
ERROR: Failed to precompile VectorizedRNG [33b4df10-0173-11e9-2a0c-851a7edac40e] to /home/username/.julia/compiled/v1.4/VectorizedRNG/wqLDZ_tYj51.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String)
 [3] _require(::Base.PkgId)
 [4] require(::Base.PkgId) (repeats 2 times)

julia> using LoopVectorization
[ Info: Precompiling LoopVectorization [bdcacae8-1622-11e9-2a5c-532679323890]
ERROR: LoadError: UndefVarError: ##s40#188 not defined
Stacktrace:
 [1] _precompile_()
 [2] top-level scope at /home/username/.julia/dev/SIMDPirates/src/SIMDPirates.jl:71
 [3] include(::Module, ::String) at ./Base.jl:377
 [4] top-level scope at none:2
 [5] eval [inlined]
 [6] eval(::Expr) at ./client.jl:449
 [7] top-level scope
in expression starting at /home/username/.julia/dev/SIMDPirates/src/SIMDPirates.jl:71
ERROR: LoadError: Failed to precompile SIMDPirates [21efa798-c60a-11e8-04d3-e1a92915a26a] to /home/username/.julia/compiled/v1.4/SIMDPirates/jEO2E_tYj51.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1263
 [3] _require(::Base.PkgId) at ./loading.jl:1022
 [4] require(::Base.PkgId) at ./loading.jl:920
 [5] require(::Module, ::Symbol) at ./loading.jl:915
 [6] include(::Module, ::String) at ./Base.jl:377
 [7] top-level scope at none:2
 [8] eval [inlined]
 [9] eval(::Expr) at ./client.jl:449
 [10] top-level scope
in expression starting at /home/username/.julia/dev/LoopVectorization/src/LoopVectorization.jl:3
ERROR: Failed to precompile LoopVectorization [bdcacae8-1622-11e9-2a5c-532679323890] to /home/username/.julia/compiled/v1.4/LoopVectorization/4TogI_tYj51.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String)
 [3] _require(::Base.PkgId)
 [4] require(::Base.PkgId) (repeats 2 times)

julia> versioninfo()
Julia Version 1.4.0-DEV.535
Commit 9babbf5* (2019-11-30 20:29 UTC)
Platform Info:
  OS: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.0 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = 24

The error is in a precompile statement in the shared dependency SIMDPirates.jl
I'm going to remove all kw and #s functions from the precompile statements in these libraries and push.

@aminya
Copy link
Contributor

aminya commented Dec 4, 2019

I get a similar error here:
#46

@aminya
Copy link
Contributor

aminya commented Dec 4, 2019

Did you find a programmatic way to remove these sentences?

timholy added a commit that referenced this issue Dec 5, 2019
@timholy
Copy link
Owner

timholy commented Dec 6, 2019

I can't test this myself because rev="graph" is not found, and I don't know how you snooped to generate the precompiles. (I don't disagree that the package is unloadable without editing the precompile files, but the point of fixing the issue is to fix SnoopCompile so it doesn't generate invalid files.)

I will just declare this fixed by #48 and let it close when that merges.

@timholy timholy mentioned this issue Dec 6, 2019
@timholy timholy closed this as completed in 15cba4d Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants