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

Division error due to CpuId.cpucores() == 0 #14

Closed
mkitti opened this issue Nov 4, 2022 · 1 comment · Fixed by #15
Closed

Division error due to CpuId.cpucores() == 0 #14

mkitti opened this issue Nov 4, 2022 · 1 comment · Fixed by #15

Comments

@mkitti
Copy link
Contributor

mkitti commented Nov 4, 2022

Since CpuId.cpucores() == 0
m-j-w/CpuId.jl#56
this produces a division error on precompilation

ntuple(i -> i == 3 ? cs[3] ÷ CpuId.cpucores() : cs[i], length(cs))

@mkitti
Copy link
Contributor Author

mkitti commented Nov 4, 2022

julia> using CPUSummary
[ Info: Precompiling CPUSummary [2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9]
ERROR: LoadError: DivideError: integer division error
Stacktrace:
  [1] div
    @ ./int.jl:288 [inlined]
  [2] div
    @ ./div.jl:316 [inlined]
  [3] div
    @ ./div.jl:40 [inlined]
  [4] #1
    @ ~/depot/packages/CPUSummary/BzuIZ/src/x86.jl:30 [inlined]
  [5] ntuple(f::CPUSummary.var"#1#2"{Tuple{Int32, Int32, Int32}}, n::Int64)
    @ Base ./ntuple.jl:19
  [6] top-level scope
    @ ~/depot/packages/CPUSummary/BzuIZ/src/x86.jl:30
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
  [8] include(x::String)
    @ CPUSummary ~/depot/packages/CPUSummary/BzuIZ/src/CPUSummary.jl:1
  [9] top-level scope
    @ ~/depot/packages/CPUSummary/BzuIZ/src/CPUSummary.jl:46
 [10] include
    @ ./Base.jl:419 [inlined]
 [11] 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:1554
 [12] top-level scope
    @ stdin:1
in expression starting at ~/depot/packages/CPUSummary/BzuIZ/src/x86.jl:29
in expression starting at ~/depot/packages/CPUSummary/BzuIZ/src/CPUSummary.jl:1
in expression starting at stdin:1

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

Successfully merging a pull request may close this issue.

1 participant