SparseIR.jl icon indicating copy to clipboard operation
SparseIR.jl copied to clipboard

Julia 1.11 issue

Open shinaoka opened this issue 1 year ago • 1 comments

One error found

conditioning: Test Failed at /Users/hiroshi/git/SparseIR.jl/test/sampling.jl:165
  Expression: length((SparseIR.SplitSVD(ones(ComplexF64, (6, 8)))).S) < 6
   Evaluated: 6 < 6

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Test/src/Test.jl:679 [inlined]
 [2] macro expansion
   @ ~/git/SparseIR.jl/test/sampling.jl:165 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Test/src/Test.jl:1700 [inlined]
 [4] macro expansion
   @ ~/git/SparseIR.jl/test/sampling.jl:144 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Test/src/Test.jl:1700 [inlined]
 [6] top-level scope
   @ ~/git/SparseIR.jl/test/sampling.jl:9

shinaoka avatar Oct 09 '24 09:10 shinaoka

Thanks for the report, looking into this!

SamuelBadr avatar Oct 09 '24 09:10 SamuelBadr

I am not sure this test makes sense. @SamuelBadr What do you think?

 @show SparseIR.SplitSVD(ones(ComplexF64, (6, 8))).S
(SparseIR.SplitSVD(ones(ComplexF64, (6, 8)))).S = [6.9282032302755105, 5.747501338471398e-16, 7.801870177058175e-48, 1.2361754353085013e-79, 5.66919951089432e-112, 3.461189509886644e-144]
6-element Vector{Float64}:
 6.9282032302755105
 5.747501338471398e-16
 7.801870177058175e-48
 1.2361754353085013e-79
 5.66919951089432e-112
 3.461189509886644e-144

shinaoka avatar Nov 09 '24 20:11 shinaoka

Strange, locally I get

julia> SparseIR.SplitSVD(ones(ComplexF64, (6, 8))).S
2-element Vector{Float64}:
 6.928203230275512
 4.644396126208122e-16

This is on

julia> versioninfo()
Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 12 × Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 6 default, 0 interactive, 3 GC (on 12 virtual cores)
Environment:
  JULIA_PKG_USE_CLI_GIT = true
  JULIA_NUM_THREADS = 6

SamuelBadr avatar Nov 09 '24 21:11 SamuelBadr

Just checked on Anna's Linux machine and there it's

julia> SparseIR.SplitSVD(ones(ComplexF64, (6, 8))).S
5-element Vector{Float64}:
 6.928203230275512
 5.747501338471397e-16
 4.428118943191847e-47
 5.697874177521321e-79
 3.522674385218e-111

I guess you're right, the test doesn't make sense. I'll delete it.

SamuelBadr avatar Nov 10 '24 08:11 SamuelBadr