Test failure on nightly (1.7.0-DEV) in macOS (x64)
kimikage opened this issue · comments
https://github.com/JuliaMath/FixedPointNumbers.jl/runs/2242543353?check_suite_focus=true
Passed
Julia Version 1.7.0-DEV.710
Commit 3635f0473d (2021-03-15 19:28 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.6.0)
CPU: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, ivybridge)
Failed
Julia Version 1.7.0-DEV.790
Commit 637f52b8eb (2021-03-31 21:10 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, ivybridge)
Float16(::N2f14): Test Failed at /Users/runner/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:235
Expression: float_err == 0
Evaluated: Float16(0.010254) == 0
Stacktrace:
[1] macro expansion
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:235 [inlined]
[2] macro expansion
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1228 [inlined]
[3] macro expansion
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:226 [inlined]
[4] macro expansion
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1153 [inlined]
[5] top-level scope
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:219
Float16(::N1f15): Test Failed at /Users/runner/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:235
Expression: float_err == 0
Evaluated: Float16(0.002441) == 0
Stacktrace:
[1] macro expansion
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:235 [inlined]
[2] macro expansion
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1228 [inlined]
[3] macro expansion
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:226 [inlined]
[4] macro expansion
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1153 [inlined]
[5] top-level scope
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:219
Float16(::N0f16): Test Failed at /Users/runner/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:235
Expression: float_err == 0
Evaluated: Float16(0.000977) == 0
Stacktrace:
[1] macro expansion
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:235 [inlined]
[2] macro expansion
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1228 [inlined]
[3] macro expansion
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:226 [inlined]
[4] macro expansion
@ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Test/src/Test.jl:1153 [inlined]
[5] top-level scope
@ ~/work/FixedPointNumbers.jl/FixedPointNumbers.jl/test/normed.jl:219
I haven't investigated the cause yet, but it's odd that it only happens on macOS. This might be a BigFloat
problem.
I can verify it locally:
julia> versioninfo()
Julia Version 1.7.0-DEV.792
Commit 80002db74c (2021-04-01 13:01 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.7.0)
CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Unfortunately, macOS workflows in GitHub Actions don't seem to be working for the past about a day. 😕
I'll wait for a while. The output of the following code may be useful for debugging.
using FixedPointNumbers
using InteractiveUtils
@code_native Float16(zero(N2f14))
@code_native Float16(0x0001 / BigFloat(16383))
N = N2f14
T = UInt16
for i = typemin(T):typemax(T)
f_expected = Float16(i / BigFloat(FixedPointNumbers.rawone(N)))
f_actual = Float16(reinterpret(N, i))
f_actual === f_expected || error("$f_actual, $f_expected")
end