Circuitscape / Circuitscape.jl

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

OutOfMemoryError() Circuitscape stops at [14] top-level scope #415

Open FaustiniG opened 5 months ago

FaustiniG commented 5 months ago

Out of memory issue after 8 hrs of running Hello everyone, I am running circuitscape to evaluate connectivity in pairwise mode. Here some info about my inputs:

The program run for 8hrs more or less, and then it stopped at 14) step: "name": "OutOfMemoryError", "message": "OutOfMemoryError()", Stacktrace: [1] Array @ .\boot.jl:477 [inlined] [2] rehash!(h::Dict{Tuple{Int64, Int64}, Int64}, newsz::Int64) @ Base .\dict.jl:185 [3] _setindex! @ .\dict.jl:358 [inlined] [4] setindex!(h::Dict{Tuple{Int64, Int64}, Int64}, v0::Int64, key::Tuple{Int64, Int64}) @ Base .\dict.jl:384 [5] get_num_pairs(ccs::Vector{Vector{Int64}}, fp::Vector{Int64}, exclude_pairs::Vector{Tuple{Int64, Int64}}) @ Circuitscape C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\core.jl:529 [6] solve(prob::Circuitscape.GraphProblem{Float64, Int64, Circuitscape.CholmodSolver}, solver::Circuitscape.CholmodSolver, flags::Circuitscape.RasterFlags, cfg::Dict{String, String}, log::Bool) @ Circuitscape C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\core.jl:328 [7] single_ground_all_pairs @ C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\core.jl:66 [inlined] [8] single_ground_all_pairs(prob::Circuitscape.GraphProblem{Float64, Int64, Circuitscape.CholmodSolver}, flags::Circuitscape.RasterFlags, cfg::Dict{String, String}) @ Circuitscape C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\core.jl:66 [9] _pt_file_no_polygons_path(rasterdata::Circuitscape.RasterData{Float64, Int64}, flags::Circuitscape.RasterFlags, cfg::Dict{String, String}) @ Circuitscape C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\raster\pairwise.jl:63 [10] raster_pairwise(T::Type, V::Type, cfg::Dict{String, String}) @ Circuitscape C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\raster\pairwise.jl:29 [11] _compute(T::Type, V::Type, cfg::Dict{String, String}) @ Circuitscape C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\run.jl:43 ... @ .\timing.jl:395 [inlined] [13] compute(path::String) @ Circuitscape C:\Users\NameUser.julia\packages\Circuitscape\Hdy8j\src\run.jl:31 [14] top-level scope @ c:\Users\NameUser\Desktop\notebooks\circuitscape_julia.ipynb:1

Circuitscape and Julia version I am running circuitscape in Julia 1.10.2, I installed circuitscape (Circuitscape v5.13.3) yesterday calling it in Vs code with:

Pkg.add(PackageSpec(name="Circuitscape", rev="master"))

Additional context My computer has 32GB of RAM, and 151GB free in the local disk.

Thank you in advance!

ViralBShah commented 3 months ago

Could you try disabling parallelism and see how far it goes? @ranjanan Is it also too many focal nodes?

ViralBShah commented 3 months ago

Also perhaps Omniscape.jl is worth checking out, if you haven't.

ranjanan commented 3 weeks ago

@FaustiniG could you attach your files please? Looks like you're using cholmod, which could run out of memory at that size. Could you try with the cg+amg solver.