Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndefRefError: access to undefined reference #417

Closed
jmsigner opened this issue May 29, 2024 · 1 comment
Closed

UndefRefError: access to undefined reference #417

jmsigner opened this issue May 29, 2024 · 1 comment

Comments

@jmsigner
Copy link

Describe the bug, with logs
I am encountering the following errors when running circuitscape.jl. I tried to alter the resolution of the resistance grid and/or the starting points. It then sometimes works. I am guessing that it has something to do with the starting points but was unable to figure out the problem so far. Any hints would be greatly be appreciated.

julia -e "using Circuitscape; compute(\"./cs4_local/run_csjl.ini\")"
[ Info: 2024-05-29 21:10:39 : Precision used: Double
[ Info: 2024-05-29 21:10:39 : Starting up Circuitscape to use 6 processes in parallel
[ Info: 2024-05-29 21:10:50 : Reading maps
[ Info: 2024-05-29 21:10:57 : Resistance/Conductance map has 7404902 nodes
[ Info: 2024-05-29 21:11:04 : There are 7404902 points and 30224 connected components
[ Info: 2024-05-29 21:11:16 : Solving point 3 of 66
[ Info: 2024-05-29 21:11:16 : Solving point 4 of 66
[ Info: 2024-05-29 21:11:17 : Solver used: CHOLMOD
[ Info: 2024-05-29 21:11:17 : Solver used: CHOLMOD
[ Info: 2024-05-29 21:11:41 : Time taken to construct cholesky factor = 17.672108292
[ Info: 2024-05-29 21:11:42 : Time taken to construct cholesky factor = 17.552872
ERROR: On worker 2:
UndefRefError: access to undefined reference
Stacktrace:
  [1] getindex
    @ ./array.jl:805 [inlined]
  [2] getindex
    @ ./abstractarray.jl:1173 [inlined]
  [3] desertag
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:96 [inlined]
  [4] handle_deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:820
  [5] deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:1403
  [6] handle_deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:846
  [7] deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:1391
  [8] handle_deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:928
  [9] deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:1403
 [10] handle_deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:846
 [11] deserialize
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Serialization/src/Serialization.jl:782 [inlined]
 [12] deserialize_msg
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Distributed/src/messages.jl:87
 [13] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [14] invokelatest
    @ ./essentials.jl:706 [inlined]
 [15] message_handler_loop
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Distributed/src/process_messages.jl:169
 [16] process_tcp_streams
    @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Distributed/src/process_messages.jl:126
 [17] #103
    @ ./task.jl:417
Stacktrace:
  [1] (::Base.var"#844#846")(x::Task)
    @ Base ./asyncmap.jl:177
  [2] foreach(f::Base.var"#844#846", itr::Vector{Any})
    @ Base ./abstractarray.jl:2141
  [3] maptwice(wrapped_f::Function, chnl::Channel{Any}, worker_tasks::Vector{Any}, c::UnitRange{Int64})
    @ Base ./asyncmap.jl:177
  [4] wrap_n_exec_twice
    @ ./asyncmap.jl:153 [inlined]
  [5] #async_usemap#829
    @ ./asyncmap.jl:103 [inlined]
  [6] #asyncmap#828
    @ ./asyncmap.jl:81 [inlined]
  [7] pmap(f::Function, p::Distributed.WorkerPool, c::UnitRange{Int64}; distributed::Bool, batch_size::Int64, on_error::Nothing, retry_delays::Vector{Any}, retry_check::Nothing)
    @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Distributed/src/pmap.jl:126
  [8] pmap(f::Function, p::Distributed.WorkerPool, c::UnitRange{Int64})
    @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Distributed/src/pmap.jl:101
  [9] pmap(f::Function, c::UnitRange{Int64}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Distributed/src/pmap.jl:156
 [10] pmap(f::Function, c::UnitRange{Int64})
    @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Distributed/src/pmap.jl:156
 [11] onetoall_kernel(data::Circuitscape.RasterData{Float64, Int64}, flags::Circuitscape.RasterFlags, cfg::Dict{String, String})
    @ Circuitscape ~/.julia/packages/Circuitscape/33lUW/src/raster/onetoall.jl:157
 [12] raster_one_to_all(T::Type, V::Type, cfg::Dict{String, String})
    @ Circuitscape ~/.julia/packages/Circuitscape/33lUW/src/raster/onetoall.jl:10
 [13] _compute(T::Type, V::Type, cfg::Dict{String, String})
    @ Circuitscape ./operators.jl:0
 [14] macro expansion
    @ ./timing.jl:287 [inlined]
 [15] compute(path::String)
    @ Circuitscape ~/.julia/packages/Circuitscape/33lUW/src/run.jl:31
 [16] top-level scope
    @ none:1

And

cat ./cs4_local/run_csjl.ini  
[Options for advanced mode]
ground_file_is_resistances = False
source_file = (Browse for a current source file)
remove_src_or_gnd = keepall
ground_file = (Browse for a ground point file)
use_unit_currents = False
use_direct_grounds = False

[Calculation options]
low_memory_mode = False
solver = cholmod
#solver = cg+amg
print_timings = True

[Options for pairwise and one-to-all and all-to-one modes]
included_pairs_file = None
use_included_pairs = False
point_file = cs4_local/start.txt


[Output options]
write_cum_cur_map_only = False
log_transform_maps = False
output_file = cs4_local/result1
write_max_cur_maps = False
write_volt_maps = False
set_null_currents_to_nodata = False
set_null_voltages_to_nodata = False
compress_grids = False
write_cur_maps = True

[Short circuit regions (aka polygons)]
use_polygons = False

[Connection scheme for raster habitat data]
connect_four_neighbors_only = True
connect_using_avg_resistances = True

[Habitat raster or graph]
habitat_file = cs4_local/resistance.asc
habitat_map_is_resistances = True

[Options for one-to-all and all-to-one modes]
use_variable_source_strengths = False
variable_source_file = None

[Version]
version = unknown

[Mask file]
use_mask = False
mask_file = None

[Circuitscape mode]
data_type = raster
scenario = one-to-all


parallelize = True
max_parallel = 6

**How to reproduce (PLEASE ATTACH YOUR PROBLEM FILES) **
Steps to reproduce the behavior, including your files (your INI, raster file, focal points, etc).

Circuitscape and Julia version

julia> versioninfo()
Julia Version 1.6.7
Commit 3b76b25b64 (2022-07-19 15:11 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  CPU: Apple M2 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, westmere)

and the latest circuitscape.jl version.

@jmsigner
Copy link
Author

jmsigner commented Jun 2, 2024

Setting parallelize = False solved the issue.

@jmsigner jmsigner closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant