Circuitscape / Circuitscape.jl

Algorithms from circuit theory to predict connectivity in heterogeneous landscapes
https://circuitscape.org
MIT License
128 stars 35 forks source link

Failing tests in Raster one to all in Julia 1.4-dev #202

Closed ViralBShah closed 4 years ago

ViralBShah commented 4 years ago
Test Summary:          | Pass  Error  Total
Single Precision Tests |  423    155    578
  Network Pairwise     |   80     13     93
  Network Advanced     |   12            12
  Raster Pairwise      |  181    141    322
  Raster Advanced      |    5             5
  Raster One to All    |  133      1    134
  Raster All to One    |   12            12
ERROR: LoadError: Some tests did not pass: 423 passed, 0 failed, 155 errored, 0 broken.
in expression starting at /Users/viral/.julia/dev/Circuitscape/test/runtests.jl:11
ERROR: Package Circuitscape errored during testing

julia> versioninfo()
Julia Version 1.4.0-DEV.512
Commit 5516f40839 (2019-11-20 18:41 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.0.0)
  CPU: Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
ViralBShah commented 4 years ago
Raster One to All: Error During Test at /Users/viral/.julia/dev/Circuitscape/src/utils.jl:366
  Test threw exception
  Expression: compare_aagrid(r, x, tol)
  MethodError: no method matching compare_aagrid(::Array{Any,2}, ::Array{Float64,2}, ::Float64)
  Closest candidates are:
    compare_aagrid(::Array{T,2}, !Matched::Array{T,2}, ::Any) where T at /Users/viral/.julia/dev/Circuitscape/src/utils.jl:398
    compare_aagrid(::Array{T,2}, !Matched::Array{T,2}) where T at /Users/viral/.julia/dev/Circuitscape/src/utils.jl:398
  Stacktrace:
   [1] compare_all_output(::String, ::Bool) at /Users/viral/.julia/dev/Circuitscape/src/utils.jl:366
   [2] macro expansion at /Users/viral/.julia/dev/Circuitscape/src/utils.jl:330 [inlined]
   [3] macro expansion at /Users/viral/julia/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1110 [inlined]
   [4] macro expansion at /Users/viral/.julia/dev/Circuitscape/src/utils.jl:324 [inlined]
   [5] macro expansion at /Users/viral/julia/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1110 [inlined]
   [6] runtests(::typeof(compute_single)) at /Users/viral/.julia/dev/Circuitscape/src/utils.jl:260
ViralBShah commented 4 years ago

This is using Circuitscape master and Julia master.

ViralBShah commented 4 years ago

The failure doesn't happen in Julia 1.3-rc5. So perhaps an upstream issue.

KristofferC commented 4 years ago

Some analysis:

https://github.com/JuliaLang/julia/issues/33904#issuecomment-557114048

ViralBShah commented 4 years ago

Fixed in https://github.com/JuliaLang/julia/pull/33909

Thanks @KristofferC