You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently some (all?) examples fail to run threaded.
E.g. julia -t 2 --project=. -e 'include("../examples/elixir_moist_euler_moist_bubble.jl")' leads to:
ERROR: LoadError: MethodError: no method matching static2val(::Int64)
The function `static2val` exists, but no method is defined for this combination of argument types.
Closest candidates are:
static2val(::Static.StaticInt{N}) where N
@ TrixiAtmo ~/trixi/TrixiAtmo-vanilla.jl/src/solvers/dgsem_p4est/containers_2d_manifold_in_3d_cartesian.jl:48
Stacktrace:
[1] get_contravariant_vector
@ ~/trixi/TrixiAtmo-vanilla.jl/src/solvers/dgsem_p4est/containers_2d_manifold_in_3d_cartesian.jl:51 [inlined]
[2] macro expansion
@ ~/.julia/packages/Trixi/6nxkA/src/callbacks_step/stepsize_dg2d.jl:97 [inlined]
...
[8] max_dt ...
@ Trixi ~/trixi/TrixiAtmo-vanilla.jl/run/dev/Trixi/src/callbacks_step/stepsize_dg2d.jl:93
[9] calculate_dt
@ ~/trixi/TrixiAtmo-vanilla.jl/run/dev/Trixi/src/callbacks_step/stepsize.jl:91 [inlined]
...
Thanks for pointing this out. I get the same issue as you for the new equation sets that use the "standard" Trixi.jl solvers, but the Cartesian and covariant solvers for PDEs on surfaces still seem to work with threading. I'll have to look what the type parameters of PtrArray are, but we could potentially dispatch on one of them, or otherwise make the Cartesian solver for surfaces not use the get_contravariant_vector function at all (the latter approach would likely require repeating more of Trixi.jl's code in TrixiAtmo.jl, which would of course be undesirable).
Edit: I refined the dispatch in #62 and it seems to work, but perhaps someone more familiar with PtrArray can comment on whether what I did makes sense and/or suggest a better solution.
Currently some (all?) examples fail to run threaded.
E.g.
julia -t 2 --project=. -e 'include("../examples/elixir_moist_euler_moist_bubble.jl")'
leads to:The reason is that
@batch
is used inmax_dt
(https://github.com/trixi-framework/Trixi.jl/blob/e93de2a5f5c9cab36e7593dc2fc7cdb8d216af48/src/callbacks_step/stepsize_dg2d.jl#L90), which turns Arrays into PtrArrays (https://github.com/JuliaSIMD/Polyester.jl?tab=readme-ov-file#important-notes). Thus, TrixiAtmo'sget_contravariant_vectors
TrixiAtmo.jl/src/solvers/dgsem_p4est/containers_2d_manifold_in_3d_cartesian.jl
Line 49 in e7c1de7
Can we somehow refine the dispatching s.t. "usual" setups keep using Trixi's version?
The text was updated successfully, but these errors were encountered: