m-j-w / CpuId.jl

Ask the CPU for cache sizes, SIMD feature support, a running hypervisor, and more.
Other
54 stars 10 forks source link

`cpuinfo()` errors on 1.0, no depwarn on v0.7 #30

Closed miguelraz closed 6 years ago

miguelraz commented 6 years ago

When I try test CpuId on v.7, all tests pass. on v1.0, I get an error on cpuinfo() because

julia> cpuinfo()
ERROR: InexactError: trunc(UInt8, 1731)
Stacktrace:
 [1] throw_inexacterror(::Symbol, ::Any, ::UInt32) at ./boot.jl:567
 [2] checked_trunc_uint at ./boot.jl:597 [inlined]
 [3] toUInt8 at ./boot.jl:663 [inlined]
 [4] Type at ./boot.jl:719 [inlined]
 [5] cpumodel() at /home/mrg/.julia/dev/CpuId/src/CpuId.jl:108
 [6] cpuinfo() at /home/mrg/.julia/dev/CpuId/src/CpuId.jl:946
 [7] top-level scope at none:0

My version is

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca* (2018-08-08 20:58 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

I don't mind making the PR to upgrade to 1.0, but can't figure out why it is calling trunc on one case and not showing a deprecation for it on v0.7

juliohm commented 6 years ago

I am getting some warnings in Julia v0.7 as described in #29 , I don't know why you are not getting warnings, but these should be fixed in order for the package to work on Julia v1.0. I am also waiting for the fix in order to release some of my packages.

KristofferC commented 6 years ago

The warnings in #29 are indeed the cause of the problem here.