-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Cross-posting from gitter: there have two mentions of Omniscape failing on a specific row / column.
In my case, I receive this error: ERROR: ArgumentError: median of an empty array is undefined, Float64[]
. The run will fail at different stages--sometimes quite far into a run, other times immediately--but always at the same row-column combination. I've tried to diagnose the error by changing the raster inputs or adjusting model parameters (e.g., solver, block size, r_cutoff [for source = resistance], and running conditional and non-conditional criteria).
Here's my error print-out. Let me know if additional information is needed.
Progress: 9%|█████ | ETA: 2:57:07
Omniscape failed on the moving window centered on row 325 column 5198
ERROR: TaskFailedException
Stacktrace:
[1] wait
@ .\task.jl:322 [inlined]
[2] threading_run(func::Function)
@ Base.Threads .\threadingconstructs.jl:34
[3] macro expansion
@ .\threadingconstructs.jl:93 [inlined]
[4] run_omniscape(cfg::Dict{String, String}, resistance::Matrix{Union{Missing, Float64}}; reclass_table::Matrix{Union{Missing, Float64}}, source_strength::Matrix{Union{Missing, Float64}}, condition1::Matrix{Union{Missing, Float64}}, condition2::Matrix{Union{Missing, Float64}}, condition1_future::Matrix{Union{Missing, Float64}}, condition2_future::Matrix{Union{Missing, Float64}}, wkt::String, geotransform::Vector{Float64}, write_outputs::Bool)
@ Omniscape C:\Users\jbaecher\.julia\packages\Omniscape\9gHf2\src\main.jl:257
[5] run_omniscape(path::String)
@ Omniscape C:\Users\jbaecher\.julia\packages\Omniscape\9gHf2\src\main.jl:536
[6] top-level scope
@ REPL[5]:1
nested task error: ArgumentError: median of an empty array is undefined, Float64[]
Stacktrace:
[1] macro expansion
@ C:\Users\jbaecher\.julia\packages\Omniscape\9gHf2\src\main.jl:278 [inlined]
[2] (::Omniscape.var"#161#threadsfor_fun#11"{Int64, ProgressMeter.Progress, Int64, Dict{String, String}, Omniscape.ConditionLayers{Float64, 2}, Omniscape.Conditions, Omniscape.OmniscapeFlags, DataType, Dict{String, Int64}, UnitRange{Int64}})(onethread::Bool)
@ Omniscape .\threadingconstructs.jl:81
[3] (::Omniscape.var"#161#threadsfor_fun#11"{Int64, ProgressMeter.Progress, Int64, Dict{String, String}, Omniscape.ConditionLayers{Float64, 2}, Omniscape.Conditions, Omniscape.OmniscapeFlags, DataType, Dict{String, Int64}, UnitRange{Int64}})()
@ Omniscape .\threadingconstructs.jl:48
caused by: ArgumentError: median of an empty array is undefined, Float64[]
Stacktrace:
[1] median!(v::Vector{Float64})
@ Statistics C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Statistics\src\Statistics.jl:791
[2] median
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Statistics\src\Statistics.jl:836 [inlined]
[3] source_target_match!(source_subset::Matrix{Union{Missing, Float64}}, n_conditions::Int64, condition_layers::Omniscape.ConditionLayers{Float64, 2}, conditions::Omniscape.Conditions, ylower::Int64, yupper::Int64, xlower::Int64, xupper::Int64, ylower_buffered::Int64, yupper_buffered::Int64, xlower_buffered::Int64, xupper_buffered::Int64)
@ Omniscape C:\Users\jbaecher\.julia\packages\Omniscape\9gHf2\src\utils.jl:231
[4] get_source(source_array::Matrix{Union{Missing, Float64}}, arguments::Dict{String, Int64}, conditional::Bool, condition_layers::Omniscape.ConditionLayers{Float64, 2}, conditions::Omniscape.Conditions, target::Omniscape.Target)
@ Omniscape C:\Users\jbaecher\.julia\packages\Omniscape\9gHf2\src\utils.jl:172
[5] solve_target!(target::Omniscape.Target, int_arguments::Dict{String, Int64}, source_strength::Matrix{Union{Missing, Float64}}, resistance::Matrix{Union{Missing, Float64}}, os_flags::Omniscape.OmniscapeFlags, cs_cfg::Dict{String, String}, condition_layers::Omniscape.ConditionLayers{Float64, 2}, conditions::Omniscape.Conditions, correction_array::Matrix{Float64}, cum_currmap::Array{Float64, 3}, fp_cum_currmap::Array{Float64, 3}, precision::DataType)
@ Omniscape C:\Users\jbaecher\.julia\packages\Omniscape\9gHf2\src\utils.jl:308
[6] macro expansion
@ C:\Users\jbaecher\.julia\packages\Omniscape\9gHf2\src\main.jl:264 [inlined]
[7] (::Omniscape.var"#161#threadsfor_fun#11"{Int64, ProgressMeter.Progress, Int64, Dict{String, String}, Omniscape.ConditionLayers{Float64, 2}, Omniscape.Conditions, Omniscape.OmniscapeFlags, DataType, Dict{String, Int64}, UnitRange{Int64}})(onethread::Bool)
@ Omniscape .\threadingconstructs.jl:81
[8] (::Omniscape.var"#161#threadsfor_fun#11"{Int64, ProgressMeter.Progress, Int64, Dict{String, String}, Omniscape.ConditionLayers{Float64, 2}, Omniscape.Conditions, Omniscape.OmniscapeFlags, DataType, Dict{String, Int64}, UnitRange{Int64}})()
@ Omniscape .\threadingconstructs.jl:48
Metadata
Metadata
Assignees
Labels
No labels