-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The following code
module tmp
using Bcube
using BcubeAccelerated
using KernelAbstractions
mesh = one_cell_mesh(:line)
fs = FunctionSpace(:Lagrange, 1)
U_p = TrialFESpace(fs, mesh)
U_u = TrialFESpace(fs, mesh)
V_p = TestFESpace(U_p)
V_u = TestFESpace(U_u)
V = MultiFESpace(V_p, V_u)
dΩ = Measure(CellDomain(mesh), 1)
l((v_u, v_p)) = ∫(v_p)dΩ
backend = BcubeAccelerated.BcubeBackendAcc(get_backend(ones(2)); kernel=BcubeAccelerated.KernelKA(), sync=false)
y = Bcube.allocate_dofs(V)
assemble_linear!(y, l, V; backend)
endproduces the following error:
ERROR: LoadError: MethodError: no method matching get_backend(::Tuple{SubArray{Float64, 1, Vector{…}, Tuple{…}, false}, SubArray{Float64, 1, Vector{…}, Tuple{…}, false}})
The function `get_backend` exists, but no method is defined for this combination of argument types.
Closest candidates are:
get_backend(::Bcube.BcubeBackendCPUSerial)
@ BcubeAccelerated BcubeAccelerated\lh15Z\src\backend.jl:39
get_backend(::RecursiveArrayTools.VectorOfArray)
@ RecursiveArrayToolsKernelAbstractionsExt RecursiveArrayTools\jieUI\ext\RecursiveArrayToolsKernelAbstractionsExt.jl:6
get_backend(::StaticArraysCore.MArray)
@ KernelAbstractions KernelAbstractions\lGrz7\ext\StaticArraysExt.jl:7
...
Stacktrace:
[1] KA_assemble!(y::Tuple{…}, f::Function, elts::Nothing, V::Bcube.MultiFESpace{…}, measure::Bcube.Measure{…}, backend::BcubeAccelerated.BcubeBackendAcc{…})
@ BcubeAccelerated BcubeAccelerated\lh15Z\src\assembler.jl:49
[2] __assemble_linear!(b::Tuple{…}, f::Function, V::Bcube.MultiFESpace{…}, measure::Bcube.Measure{…}, backend::BcubeAccelerated.BcubeBackendAcc{…})
@ BcubeAccelerated BcubeAccelerated\lh15Z\src\assembler.jl:39
[3] _assemble_linear!(b::Vector{…}, l::typeof(Main.tmp.l), V::Bcube.MultiFESpace{…}, integration::Bcube.Integration{…}, backend::BcubeAccelerated.BcubeBackendAcc{…})
@ Bcube Bcube.jl\src\assembler\assembler.jl:241
[4] assemble_linear!(b::Vector{…}, l::typeof(Main.tmp.l), V::Bcube.MultiFESpace{…}; backend::BcubeAccelerated.BcubeBackendAcc{…})
@ Bcube Bcube.jl\src\assembler\assembler.jl:220
[5] top-level scope
@ BcubeMiniApps\stability\taylor-culick\tmp\tmp.jl:22
[6] include(fname::String)
@ Main .\sysimg.jl:38
[7] top-level scope
@ REPL[4]:1This is because we reshape the vector b into a Tuple of SubArraywhen dealing with multi-fespaces. Maybe we should move
BcubeAccelerated.jl/src/assembler.jl
Line 49 in 9d7eefd
| @assert backendKA == get_backend(y) |
https://github.com/bcube-project/Bcube.jl/blob/a0858c10c9a465720fefa4c9251e38baa82fec0c/src/assembler/assembler.jl#L240
ghislainb
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working