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

Failed to precompile, load error #701

Closed
daammiix opened this issue Dec 14, 2020 · 14 comments
Closed

Failed to precompile, load error #701

daammiix opened this issue Dec 14, 2020 · 14 comments

Comments

@daammiix
Copy link

[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]
ERROR: LoadError: LoadError: type NullAttr has no field size
Stacktrace:
[1] getproperty at .\Base.jl:33 [inlined]
[2] define_cache(::Int64) at C:\Users\dimit.julia\packages\VectorizationBase\r2R5L\src\topology.jl:33
[3] top-level scope at C:\Users\dimit.julia\packages\VectorizationBase\r2R5L\src\topology.jl:43
[4] include(::Function, ::Module, ::String) at .\Base.jl:380
[5] include at .\Base.jl:368 [inlined]
[6] include(::String) at C:\Users\dimit.julia\packages\VectorizationBase\r2R5L\src\VectorizationBase.jl:1
[7] top-level scope at C:\Users\dimit.julia\packages\VectorizationBase\r2R5L\src\VectorizationBase.jl:275
[8] include(::Function, ::Module, ::String) at .\Base.jl:380
[9] include(::Module, ::String) at .\Base.jl:368
[10] top-level scope at none:2
[11] eval at .\boot.jl:331 [inlined]
[12] eval(::Expr) at .\client.jl:467
[13] top-level scope at .\none:3
in expression starting at C:\Users\dimit.julia\packages\VectorizationBase\r2R5L\src\topology.jl:43
in expression starting at C:\Users\dimit.julia\packages\VectorizationBase\r2R5L\src\VectorizationBase.jl:275
ERROR: LoadError: Failed to precompile VectorizationBase [3d5dd08c-fd9d-11e8-17fa-ed2836048c2f] to C:\Users\dimit.julia\compiled\v1.5\VectorizationBase\Dto5m_XBoBh.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923
[6] include(::Function, ::Module, ::String) at .\Base.jl:380
[7] include(::Module, ::String) at .\Base.jl:368
[8] top-level scope at none:2
[9] eval at .\boot.jl:331 [inlined]
[10] eval(::Expr) at .\client.jl:467
[11] top-level scope at .\none:3
in expression starting at C:\Users\dimit.julia\packages\LoopVectorization\N0Zry\src\LoopVectorization.jl:7
ERROR: LoadError: LoadError: Failed to precompile LoopVectorization [bdcacae8-1622-11e9-2a5c-532679323890] to C:\Users\dimit.julia\compiled\v1.5\LoopVectorization\4TogI_XBoBh.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923
[6] include(::Function, ::Module, ::String) at .\Base.jl:380
[7] include at .\Base.jl:368 [inlined]
[8] include(::String) at C:\Users\dimit.julia\packages\RecursiveFactorization\6qPb5\src\RecursiveFactorization.jl:1
[9] top-level scope at C:\Users\dimit.julia\packages\RecursiveFactorization\6qPb5\src\RecursiveFactorization.jl:3
[10] include(::Function, ::Module, ::String) at .\Base.jl:380
[11] include(::Module, ::String) at .\Base.jl:368
[12] top-level scope at none:2
[13] eval at .\boot.jl:331 [inlined]
[14] eval(::Expr) at .\client.jl:467
[15] top-level scope at .\none:3
in expression starting at C:\Users\dimit.julia\packages\RecursiveFactorization\6qPb5\src\lu.jl:1
in expression starting at C:\Users\dimit.julia\packages\RecursiveFactorization\6qPb5\src\RecursiveFactorization.jl:3
ERROR: LoadError: Failed to precompile RecursiveFactorization [f2c3362d-daeb-58d1-803e-2bc74f2840b4] to C:\Users\dimit.julia\compiled\v1.5\RecursiveFactorization\tEwl6_XBoBh.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923
[6] include(::Function, ::Module, ::String) at .\Base.jl:380
[7] include(::Module, ::String) at .\Base.jl:368
[8] top-level scope at none:2
[9] eval at .\boot.jl:331 [inlined]
[10] eval(::Expr) at .\client.jl:467
[11] top-level scope at .\none:3
in expression starting at C:\Users\dimit.julia\packages\DiffEqBase\cuMMc\src\DiffEqBase.jl:3
ERROR: LoadError: Failed to precompile DiffEqBase [2b5f629d-d688-5b77-993f-72d75c75574e] to C:\Users\dimit.julia\compiled\v1.5\DiffEqBase\oaevG_XBoBh.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923
[6] include(::Function, ::Module, ::String) at .\Base.jl:380
[7] include(::Module, ::String) at .\Base.jl:368
[8] top-level scope at none:2
[9] eval at .\boot.jl:331 [inlined]
[10] eval(::Expr) at .\client.jl:467
[11] top-level scope at .\none:3
in expression starting at C:\Users\dimit.julia\packages\DifferentialEquations\fpohE\src\DifferentialEquations.jl:5
ERROR: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to C:\Users\dimit.julia\compiled\v1.5\DifferentialEquations\UQdwS_XBoBh.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923

Can someone help with this?

@ChrisRackauckas
Copy link
Member

ChrisRackauckas commented Dec 14, 2020

@chriselrod do you know what can cause this?

@chriselrod
Copy link

chriselrod commented Dec 14, 2020

@daammiix
I think this is related:
JuliaSIMD/VectorizationBase.jl#27
I.e., "Hwloc has proven to be unreliable".

Earlier, I used CpuId.jl instead, which only supports Intel and AMD, but has been pretty reliable for them.
For unsupported CPUs, I just made some basic assumptions.
I think I should:

  1. Depend on CpuId.jl again, and use it for Sys.ARCH === :x86_64 or Sys.ARCH === :i686.
  2. Use Hwloc.jl otherwise.

I'll only using the one library based on Sys.ARCH, but it would be nice if there were a way to not require both of these to be dependencies.

@chriselrod
Copy link

@daammiix I would like to know if you are in fact on an x86 cpu. If you are not, the changes I propose above will not help you. Mind showing me

versioninfo()

?

I'd also like to know if you're doing anything like running in a VM or similar basic details about your setup. It'd help me to know on which sorts of systems/setups CpuId doesn't work well.

@daammiix
Copy link
Author

daammiix commented Dec 14, 2020

@chriselrod
versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: AMD Athlon(tm) X4 840 Quad Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, bdver3)
Environment:
JULIA_EDITOR = "C:\Users\dimit\AppData\Local\Programs\Microsoft VS Code\Code.exe"
JULIA_NUM_THREADS =

I am not running VM

@chriselrod
Copy link

Could you show me the outputs of:

using CpuId
cachesize()
cachelinesize()
cpucores()

using Hwloc
Hwloc.topology_load()

@daammiix
Copy link
Author

@chriselrod
julia> cachesize()
(16384, 2097152)
julia> cachelinesize()
64
julia> cpucores()
4
julia> Hwloc.topology_load()
D0: L0 P0 Machine
D1: L0 P-1 Package
D2: L0 P-1 L2Cache Cache{size=2097152,depth=2,linesize=64,associativity=16,type=Unified}
D3: L0 P-1 Core
D4: L0 P-1 L1Cache Cache{size=16384,depth=1,linesize=64,associativity=4,type=Data}
D5: L0 P0 PU
D4: L1 P-1 L1Cache Cache{size=16384,depth=1,linesize=64,associativity=4,type=Data}
D5: L1 P1 PU
D2: L1 P-1 L2Cache Cache{size=2097152,depth=2,linesize=64,associativity=16,type=Unified}
D3: L1 P-1 Core
D4: L2 P-1 L1Cache Cache{size=16384,depth=1,linesize=64,associativity=4,type=Data}
D5: L2 P2 PU
D4: L3 P-1 L1Cache Cache{size=16384,depth=1,linesize=64,associativity=4,type=Data}
D5: L3 P3 PU

@chriselrod
Copy link

Great, thanks.

Now, does this work:

using Hwloc

const TOPOLOGY = Hwloc.topology_load();
const CACHE = TOPOLOGY.children[1].children[1];
const COUNTS = Hwloc.histmap(TOPOLOGY);
# TODO: Makes topological assumptions that aren't right for
# multiple nodes or with >3 or <3 levels of Cache.

const CACHE_COUNT = (
    COUNTS[:L1Cache],
    COUNTS[:L2Cache],
    COUNTS[:L3Cache],
    COUNTS[:L4Cache]
)
const NUM_CORES = COUNTS[:Core]

const CACHE_LEVELS = something(findfirst(isequal(0), CACHE_COUNT) - 1, length(CACHE_COUNT) + 1)

function define_cache(N)
    if N > CACHE_LEVELS
        return (
            size = nothing,
            depth = nothing,
            linesize = nothing,
            associativity = nothing,
            type = nothing
        )
    end
    cache_name = (:L1Cache, :L2Cache, :L3Cache, :L4Cache)[N]
    c = first(t for t in TOPOLOGY if t.type_ == cache_name && t.attr.depth == N).attr
    (
        size = c.size,
        depth = c.depth,
        linesize = c.linesize,
        associativity = c.associativity,
        type = c.type_
    )
end


const L₁CACHE = define_cache(1)
const L₂CACHE = define_cache(2)
const L₃CACHE = define_cache(3)
const L₄CACHE = define_cache(4)
"""
L₁, L₂, L₃, L₄ cache size
"""
const CACHE_SIZE = (
    L₁CACHE.size,
    L₂CACHE.size,
    L₃CACHE.size,
    L₄CACHE.size
)

?

@daammiix
Copy link
Author

@chriselrod
ERROR: LoadError: type CacheAttr has no field attr
Stacktrace:
[1] getproperty at .\Base.jl:33 [inlined]
[2] define_cache(::Int64) at c:\Users\dimit\Desktop\Error.jl:31
[3] top-level scope at c:\Users\dimit\Desktop\Error.jl:41
[4] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088
[5] include_string(::Module, ::String, ::String) at .\loading.jl:1096
[6] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at .\essentials.jl:710
[7] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at .\essentials.jl:709
[8] inlineeval(::Module, ::String, ::Int64, ::Int64, ::String; softscope::Bool) at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\eval.jl:185
[9] (::VSCodeServer.var"#61#65"{String,Int64,Int64,String,Module,Bool,VSCodeServer.ReplRunCodeRequestParams})() at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\eval.jl:144
[10] withpath(::VSCodeServer.var"#61#65"{String,Int64,Int64,String,Module,Bool,VSCodeServer.ReplRunCodeRequestParams}, ::String) at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\repl.jl:124
[11] (::VSCodeServer.var"#60#64"{String,Int64,Int64,String,Module,Bool,Bool,VSCodeServer.ReplRunCodeRequestParams})() at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\eval.jl:142
[12] hideprompt(::VSCodeServer.var"#60#64"{String,Int64,Int64,String,Module,Bool,Bool,VSCodeServer.ReplRunCodeRequestParams}) at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\repl.jl:36
[13] (::VSCodeServer.var"#59#63"{String,Int64,Int64,String,Module,Bool,Bool,VSCodeServer.ReplRunCodeRequestParams})() at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\eval.jl:110
[14] with_logstate(::Function, ::Any) at .\logging.jl:408
[15] with_logger at .\logging.jl:514 [inlined]
[16] (::VSCodeServer.var"#58#62"{VSCodeServer.ReplRunCodeRequestParams})() at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\eval.jl:109
[17] #invokelatest#1 at .\essentials.jl:710 [inlined]
[18] invokelatest(::Any) at .\essentials.jl:709
[19] macro expansion at c:\Users\dimit.vscode\extensions\julialang.language-julia-1.0.10\scripts\packages\VSCodeServer\src\eval.jl:27 [inlined]
[20] (::VSCodeServer.var"#56#57")() at .\task.jl:356
in expression starting at c:\Users\dimit\Desktop\Error.jl:41

@chriselrod
Copy link

I posted two code snippets.

The first one also gave me that error, but I fixed it in the second.

Can you confirm you get that with the second code snippet (the one I did not delete) gives you that error?

@daammiix
Copy link
Author

@chriselrod
It works now,no errors,what next should i do?

@chriselrod
Copy link

chriselrod commented Dec 14, 2020

Okay, thanks, I'll replace the code that caused your error in VectorizationBase with that and make a new release.

I'll post here once that happens so you can update your packages and (assuming nothing else goes wrong) precompile DifferentialEquations.

@daammiix
Copy link
Author

@chriselrod
Okey,thanks.

@chriselrod
Copy link

It's merged. Things should work after updating packages (on VectorizationBase 0.13.12+).

@daammiix
Copy link
Author

@chriselrod
Yeah,its working,thank You a lot man.

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