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

Error using NaNMean in debugger #22

Closed
CMGreenspon opened this issue Jun 15, 2022 · 2 comments
Closed

Error using NaNMean in debugger #22

CMGreenspon opened this issue Jun 15, 2022 · 2 comments

Comments

@CMGreenspon
Copy link

Hi,

Everything works when running the the REPL (in VSCode) but when using the debug mode it crashes.

`Exception has occurred: ErrorException
this intrinsic must be compiled to be called

Stacktrace:
[1] vle(p1::Core.LLVMPtr{Float64, 0}, p2::Core.LLVMPtr{Float64, 0})
@ VectorizationBase C:\Users\somlab.julia\packages\VectorizationBase\9edvL\src\strided_pointers\stridedpointers.jl:517
[2] vle(p1::Ptr{Float64}, p2::Ptr{Float64}, sp::VectorizationBase.OffsetPrecalc{Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}, LayoutPointers.StridedPointer{Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}}}, Tuple{Nothing, Tuple{Int64, Int64}}})
@ VectorizationBase C:\Users\somlab.julia\packages\VectorizationBase\9edvL\src\strided_pointers\stridedpointers.jl:526
[3] turbo!(#unused#::Val{(false, 0, 0, 0, false, 4, 32, 15, 64, 32768, 262144, 16777216, 0x0000000000000001)}, #unused#::Val{(:numericconstant, Symbol("###0###7###"), LoopVectorization.OperationStruct(0x00000000000000000000000000000001, 0x00000000000000000000000000000000, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.constant, 0x0001, 0x00), Symbol(""), :∅, LoopVectorization.OperationStruct(0x00000000000000000000000000000001, 0x00000000000000000000000000000000, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.constant, 0x0002, 0x00), :LoopVectorization, :getindex, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.memload, 0x0003, 0x01), :LoopVectorization, :(==), LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000030003, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0004, 0x00), :LoopVectorization, :add_fast, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x00000000000000000000000000040001, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0001, 0x00), :LoopVectorization, :identity, LoopVectorization.OperationStruct(0x00000000000000000000000000000001, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x00000000000000000000000000000005, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0001, 0x00), :LoopVectorization, :LOOPCONSTANTINSTRUCTION, LoopVectorization.OperationStruct(0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, LoopVectorization.constant, 0x0005, 0x00), :LoopVectorization, :ifelse, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000400030007, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0006, 0x00), :LoopVectorization, :add_fast, LoopVectorization.OperationStruct(0x00000000000000000000000000000012, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x00000000000000000000000000080002, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0002, 0x00), :LoopVectorization, :identity, LoopVectorization.OperationStruct(0x00000000000000000000000000000001, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x00000000000000000000000000000009, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0002, 0x00), :LoopVectorization, :inv_fast, LoopVectorization.OperationStruct(0x00000000000000000000000000000001, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x00000000000000000000000000000006, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0007, 0x00), :LoopVectorization, :mul_fast, LoopVectorization.OperationStruct(0x00000000000000000000000000000001, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x000000000000000000000000000a000b, 0x00000000000000000000000000000000, LoopVectorization.compute, 0x0008, 0x00), :LoopVectorization, :setindex!, LoopVectorization.OperationStruct(0x00000000000000000000000000000001, 0x00000000000000000000000000000002, 0x00000000000000000000000000000000, 0x0000000000000000000000000000000c, 0x00000000000000000000000000000000, LoopVectorization.memstore, 0x0009, 0x02))}, #unused#::Val{(LoopVectorization.ArrayRefStruct{:A, Symbol("##vptr##_A")}(0x00000000000000000000000000000101, 0x00000000000000000000000000000102, 0x00000000000000000000000000000000, 0x00000000000000000000000000000101), LoopVectorization.ArrayRefStruct{:Bᵥ, Symbol("##vptr##_Bᵥ")}(0x00000000000000000000000000000001, 0x00000000000000000000000000000001, 0x00000000000000000000000000000000, 0x00000000000000000000000000000001))}, #unused#::Val{(0, (), (7,), (), (), ((1, LoopVectorization.HardInt),), ())}, #unused#::Val{(:i_1, :i_2)}, #unused#::Val{Tuple{Tuple{CloseOpenIntervals.CloseOpen{Static.StaticInt{0}, Int64}, CloseOpenIntervals.CloseOpen{Static.StaticInt{0}, Int64}}, Tuple{LayoutPointers.GroupedStridedPointers{Tuple{Ptr{Float64}, Ptr{Float64}}, (1, 1), (0, 0), ((1, 2), (1,)), ((1, 2), (3,)), Tuple{Static.StaticInt{8}, Int64, Static.StaticInt{8}}, Tuple{Static.StaticInt{0}, Static.StaticInt{0}, Static.StaticInt{0}}}, Float64, Float64}}}, var#arguments#::Tuple{Int64, Int64, Ptr{Float64}, Ptr{Float64}, Int64, Float64, Float64})
@ LoopVectorization C:\Users\somlab.julia\packages\LoopVectorization\ORJxS\src\reconstruct_loopset.jl:947
[4] _nanmean!(B::Matrix{Float64}, A::Matrix{Float64}, dims::Tuple{Static.StaticInt{2}})
@ NaNStatistics C:\Users\somlab.julia\packages\NaNStatistics\P1OCn\src\ArrayStats\nanmean.jl:146
[5] _nanmean!(B::Matrix{Float64}, A::Matrix{Float64}, dims::Tuple{Int64})
@ NaNStatistics C:\Users\somlab.julia\packages\NaNStatistics\P1OCn\src\ArrayStats\nanmean.jl:190
[6] _nanmean(A::Matrix{Float64}, dims::Tuple{Int64})
@ NaNStatistics C:\Users\somlab.julia\packages\NaNStatistics\P1OCn\src\ArrayStats\nanmean.jl:49
[7] _nanmean(A::Matrix{Float64}, dims::Int64)
@ NaNStatistics C:\Users\somlab.julia\packages\NaNStatistics\P1OCn\src\ArrayStats\nanmean.jl:39
[8] __nanmean(A::Matrix{Float64}, region::Int64, #unused#::Colon)
@ NaNStatistics C:\Users\somlab.julia\packages\NaNStatistics\P1OCn\src\ArrayStats\nanmean.jl:33
[9] nanmean(A::Matrix{Float64}; dims::Int64, dim::Colon)
@ NaNStatistics C:\Users\somlab.julia\packages\NaNStatistics\P1OCn\src\ArrayStats\nanmean.jl:31
[10] (::NaNStatistics.var"#nanmean##kw")(::NamedTuple{(:dims,), Tuple{Int64}}, ::typeof(nanmean), A::Matrix{Float64})
@ NaNStatistics C:\Users\somlab.julia\packages\NaNStatistics\P1OCn\src\ArrayStats\nanmean.jl:31
[11] top-level scope
@ c:\GitHub\BCIDetectionThresholdSimulations\main.jl:57`

@brenhinkeller
Copy link
Owner

brenhinkeller commented Jun 16, 2022

Ah, I think this is likely to be a fundamental limitation related to the fact that, AFAIU, the VSCode-Julia debugger interprets, rather than compiles Julia code (presumably via JuliaInterpreter.jl?), while LoopVectorization.jl uses llvmcalls which must be compiled. It's possible the JuliaInterpreter.jl / VSCode-Julia folks could add support for this, but if not then you might also try Infiltrator.jl for debugging (which should compile and also be generally faster)

@brenhinkeller
Copy link
Owner

Closing as a limitation of the debugger rather than this package

@brenhinkeller brenhinkeller closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2023
This issue was closed.
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

2 participants