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

using @infiltrate macro inside @floop doesn't compile #130

Open
SobhanMP opened this issue Jun 5, 2022 · 1 comment
Open

using @infiltrate macro inside @floop doesn't compile #130

SobhanMP opened this issue Jun 5, 2022 · 1 comment

Comments

@SobhanMP
Copy link

SobhanMP commented Jun 5, 2022

using FLoops, Infiltrator
@floop for i in 1:1000
       x = randn(100, 100)
       @infiltrate
end

gives

ERROR: LoadError: deepcopy of Modules not supported
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] deepcopy_internal(x::Module, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:33
  [3] _deepcopy_array_t(x::Array, T::Type, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:105
  [4] deepcopy_internal(x::Vector{Any}, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:92
  [5] deepcopy_internal(x::Any, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:65
  [6] _deepcopy_array_t(x::Array, T::Type, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:105
  [7] deepcopy_internal(x::Vector{Any}, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:92
  [8] deepcopy_internal(x::Any, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:65
  [9] _deepcopy_array_t(x::Array, T::Type, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:105
 [10] deepcopy_internal(x::Vector{Any}, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:92
 [11] deepcopy_internal(x::Any, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:65
 [12] _deepcopy_array_t(x::Array, T::Type, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:105
 [13] deepcopy_internal(x::Vector{Any}, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:92
 [14] deepcopy_internal(x::Any, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:65
 [15] _deepcopy_array_t(x::Array, T::Type, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:105
 [16] deepcopy_internal(x::Vector{Any}, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:92
 [17] deepcopy_internal(x::Any, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:65
 [18] deepcopy
    @ ./deepcopy.jl:26 [inlined]
 [19] as_parallel_loop(ctx::FLoops.MacroContext, rf_arg::Symbol, coll::Expr, body0::Expr, simd::Bool, executor::Nothing)
    @ FLoops ~/.julia/packages/FLoops/3ZEuy/src/reduce.jl:606
 [20] floop_parallel(ctx::FLoops.MacroContext, ex::Expr, simd::Bool, executor::Nothing)
    @ FLoops ~/.julia/packages/FLoops/3ZEuy/src/reduce.jl:255
 [21] floop_parallel(ctx::FLoops.MacroContext, ex::Expr, simd::Bool)
    @ FLoops ~/.julia/packages/FLoops/3ZEuy/src/reduce.jl:245
 [22] var"@floop"(__source__::LineNumberNode, __module__::Module, ex::Any)
    @ FLoops ~/.julia/packages/FLoops/3ZEuy/src/macro.jl:43
in expression starting at REPL[4]:1

@SobhanMP SobhanMP changed the title using @infiltrator macro inside @floop doesn't compile using @infiltrate macro inside @floop doesn't compile Jun 5, 2022
@milankl
Copy link

milankl commented Mar 27, 2023

I get the same error message when using the @unpack macro from Parameters.jl

julia> struct AB
           A
           B
       end

julia> @floop for i in 1:2
           @unpack A = AB
       end
ERROR: deepcopy of Modules not supported
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] deepcopy_internal(x::Module, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:33
  [3] _deepcopy_array_t(x::Array, T::Type, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:105
  [4] deepcopy_internal(x::Vector{Any}, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:92
  [5] deepcopy_internal(x::Any, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:65
  [6] _deepcopy_array_t(x::Array, T::Type, stackdict::IdDict{Any, Any})
    @ Base ./deepcopy.jl:105
...

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