slimgroup / JUDI.jl

Julia Devito inversion.
https://slimgroup.github.io/JUDI.jl
MIT License
96 stars 29 forks source link

Failed to run 2D Modeling Quickstart from the website #171

Closed jddorellanao closed 1 year ago

jddorellanao commented 1 year ago

This error I get is similar to this issue. It occurs at this line:

d_obs = F*q
UndefRefError: access to undefined reference

Stacktrace:
  [1] getproperty
    @ [./Base.jl:38](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/Base.jl:38) [inlined]
  [2] getindex
    @ [./refvalue.jl:56](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/refvalue.jl:56) [inlined]
  [3] pylock(f::JUDI.var"#129#132"{Model, JUDIOptions, Nothing, Dict{Symbol, PyCall.PyObject}, PyCall.PyObject})
    @ JUDI [~/.julia/packages/JUDI/wJSeg/src/JUDI.jl:65](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/~/.julia/packages/JUDI/wJSeg/src/JUDI.jl:65)
  [4] devito_model(model::Model, options::JUDIOptions, dm::Nothing)
    @ JUDI [~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Utils/auxiliaryFunctions.jl:31](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Utils/auxiliaryFunctions.jl:31)
  [5] time_modeling(model_full::Model, srcGeometry::GeometryIC{Float32}, srcData::Matrix{Float32}, recGeometry::GeometryIC{Float32}, recData::Nothing, dm::Nothing, op::Symbol, options::JUDIOptions, fw::Bool)
    @ JUDI [~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/time_modeling_serial.jl:33](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/time_modeling_serial.jl:33)
  [6] propagate(F::judiDataSourceModeling{Float32, :forward}, q::judiVector{Float32, Matrix{Float32}})
    @ JUDI [~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/propagation.jl:9](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/propagation.jl:9)
  [7] run_and_reduce(func::Function, #unused#::Nothing, nsrc::Int64, arg_func::JUDI.var"#234#235"{judiDataSourceModeling{Float32, :forward}, judiVector{Float32, Matrix{Float32}}})
    @ JUDI [~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/propagation.jl:32](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/propagation.jl:32)
  [8] multi_src_propagate(F::judiDataSourceModeling{Float32, :forward}, q::judiVector{Float32, Matrix{Float32}})
    @ JUDI [~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/propagation.jl:67](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/~/.julia/packages/JUDI/wJSeg/src/TimeModeling/Modeling/propagation.jl:67)
  [9] *(F::judiDataSourceModeling{Float32, :forward}, q::judiVector{Float32, Matrix{Float32}})
    @ JUDI [~/.julia/packages/JUDI/wJSeg/src/TimeModeling/LinearOperators/operators.jl:173](https://vscode-remote+wsl-002bdebian.vscode-resource.vscode-cdn.net/home/jdd/tests/~/.julia/packages/JUDI/wJSeg/src/TimeModeling/LinearOperators/operators.jl:173)
 [10] top-level scope
    @ 2DModelingQuickstart.ipynb:1

I'm using Debian WSL, the version of the gcc I have is gcc (Debian 10.2.1-6) 10.2.1 20210110 and I've already set an env

image

Is there something I set wrongly o missing?

mloubout commented 1 year ago

If your version of gcc is just called gcc then you can just use the standard DEBVITO_ARCH=gnu , the custom one is only needed if your compiler have non standard name. I have JUDI setup on WSL at home and it work pretty well so not quite sure what the issue is here. Did you run this through vs-code or in the wsl debian terminal?

jddorellanao commented 1 year ago

I did what you said and I work perfectly. By the way, I run this through vs-code. Thanks for the quick reply. Cheers