Been working for weeks with the same code to run batches of models in Circuitscape. The machine has a LOT of memory and available storage, yet I am now getting an out of memory error. I don’t understand the Stacktrace or how to clear temporary data that might be eating up memory? Can someone please explain what the code below indicates and/or how to clear temp data? Does GC.gc() do this?
Super new to Julia!
ERROR: OutOfMemoryError()
Stacktrace:
[1] Array
@ .\boot.jl:457 [inlined]
[2] spmatmul(A::SparseArrays.SparseMatrixCSC{Float64, Int64}, B::SparseArrays.SparseMatrixCSC{Float64, Int64})
@ SparseArrays C:\Users\Imogene\AppData\Local\Programs\Julia-1.7.3\share\julia\stdlib\v1.7\SparseArrays\src\linalg.jl:196
[3] *
@ C:\Users\Imogene\AppData\Local\Programs\Julia-1.7.3\share\julia\stdlib\v1.7\SparseArrays\src\linalg.jl:166 [inlined]
[4] _tri_matmul(A::LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}, B::SparseArrays.SparseMatrixCSC{Float64, Int64}, C::SparseArrays.SparseMatrixCSC{Float64, Int64}, δ::Nothing)
@ LinearAlgebra C:\Users\Imogene\AppData\Local\Programs\Julia-1.7.3\share\julia\stdlib\v1.7\LinearAlgebra\src\matmul.jl:1132
[5] _tri_matmul
@ C:\Users\Imogene\AppData\Local\Programs\Julia-1.7.3\share\julia\stdlib\v1.7\LinearAlgebra\src\matmul.jl:1124 [inlined]
[6] *
@ C:\Users\Imogene\AppData\Local\Programs\Julia-1.7.3\share\julia\stdlib\v1.7\LinearAlgebra\src\matmul.jl:1120 [inlined]
[7] extend_hierarchy!(levels::Vector{AlgebraicMultigrid.Level{SparseArrays.SparseMatrixCSC{Float64, Int64}, SparseArrays.SparseMatrixCSC{Float64, Int64}, LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}}}, strength::AlgebraicMultigrid.SymmetricStrength{Float64}, aggregate::AlgebraicMultigrid.StandardAggregation, smooth::AlgebraicMultigrid.JacobiProlongation{Float64}, improve_candidates::AlgebraicMultigrid.GaussSeidel{AlgebraicMultigrid.SymmetricSweep}, diagonal_dominance::Bool, keep::Bool, A::SparseArrays.SparseMatrixCSC{Float64, Int64}, B::Vector{Float64}, symmetry::AlgebraicMultigrid.HermitianSymmetry, bsr_flag::Bool)
@ AlgebraicMultigrid C:\Users\Imogene\.julia\packages\AlgebraicMultigrid\ASpK7\src\aggregation.jl:81
[8] smoothed_aggregation(A::SparseArrays.SparseMatrixCSC{Float64, Int64}, ::Type{Val{1}}; symmetry::AlgebraicMultigrid.HermitianSymmetry, strength::AlgebraicMultigrid.SymmetricStrength{Float64}, aggregate::AlgebraicMultigrid.StandardAggregation, smooth::AlgebraicMultigrid.JacobiProlongation{Float64}, presmoother::AlgebraicMultigrid.GaussSeidel{AlgebraicMultigrid.SymmetricSweep}, postsmoother::AlgebraicMultigrid.GaussSeidel{AlgebraicMultigrid.SymmetricSweep}, improve_candidates::AlgebraicMultigrid.GaussSeidel{AlgebraicMultigrid.SymmetricSweep}, max_levels::Int64, max_coarse::Int64, diagonal_dominance::Bool, keep::Bool, coarse_solver::Type, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ AlgebraicMultigrid C:\Users\Imogene\.julia\packages\AlgebraicMultigrid\ASpK7\src\aggregation.jl:37
[9] smoothed_aggregation (repeats 2 times)
@ C:\Users\Imogene\.julia\packages\AlgebraicMultigrid\ASpK7\src\aggregation.jl:16 [inlined]
[10] macro expansion
@ .\timing.jl:299 [inlined]
[11] solve(prob::Circuitscape.GraphProblem{Float64, Int64, Circuitscape.AMGSolver}, #unused#::Circuitscape.AMGSolver, flags::Circuitscape.RasterFlags, cfg::Dict{String, String}, log::Bool)
@ Circuitscape C:\Users\Imogene\.julia\packages\Circuitscape\XpftG\src\core.jl:155
[12] single_ground_all_pairs (repeats 2 times)
@ C:\Users\Imogene\.julia\packages\Circuitscape\XpftG\src\core.jl:66 [inlined]
[13] _pt_file_no_polygons_path(rasterdata::Circuitscape.RasterData{Float64, Int64}, flags::Circuitscape.RasterFlags, cfg::Dict{String, String})
@ Circuitscape C:\Users\Imogene\.julia\packages\Circuitscape\XpftG\src\raster\pairwise.jl:63
[14] raster_pairwise(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape C:\Users\Imogene\.julia\packages\Circuitscape\XpftG\src\raster\pairwise.jl:29
[15] _compute(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape C:\Users\Imogene\.julia\packages\Circuitscape\XpftG\src\run.jl:43
[16] macro expansion
@ .\timing.jl:299 [inlined]
[17] compute(path::String)
@ Circuitscape C:\Users\Imogene\.julia\packages\Circuitscape\XpftG\src\run.jl:31
[18] top-level scope
@ REPL[1]:1