JuliaCI / JuliaCI/BenchmarkTools.jl
InexactError when running on 32-bit platform
Open
Nobody has claimed this yet.
bug
- Dominant language
- Julia
- Stars
- 684
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
I am reliably hitting an InexactError when using @benchmark on a 32-bit ARM platform (a Zynq7020 with a Cortex A9).
Here is an example of when it does and doesn't happen:
julia> using BenchmarkTools
julia> @benchmark sleep(1)
BenchmarkTools.Trial:
memory estimate: 64 bytes
allocs estimate: 5
--------------
minimum time: 1.001 s (0.00% GC)
median time: 1.002 s (0.00% GC)
mean time: 1.002 s (0.00% GC)
maximum time: 1.002 s (0.00% GC)
--------------
samples: 5
evals/sample: 1
julia> @benchmark sleep(5)
ERROR: InexactError: trunc(Int32, 5.005859015e9)
Stacktrace:
[1] trunc at ./float.jl:682 [inlined]
[2] ceil(::Type{Int32}, ::Float64) at ./float.jl:365
[3] tune!(::BenchmarkTools.Benchmark{Symbol("##benchmark#258")}, ::BenchmarkTools.Parameters; progressid::Nothing, nleaves::Float64, ndone::Float64, verbose::Bool, pad::String, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /root/.julia/packages/BenchmarkTools/eCEpo/src/execution.jl:209
[4] tune! at /root/.julia/packages/BenchmarkTools/eCEpo/src/execution.jl:208 [inlined] (repeats 2 times)
[5] top-level scope at /root/.julia/packages/BenchmarkTools/eCEpo/src/execution.jl:288
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/execution.jl around line 209, where the stack trace shows tune! failing, and reproduce the issue with @benchmark sleep(5) on a 32-bit ARM platform. Compare it with the working sleep(1) case; done means the longer benchmark completes without InexactError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100