-
Notifications
You must be signed in to change notification settings - Fork 113
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
WIP: Switch to P4est with CBinding v1 #835
Conversation
When running julia> using Revise, Trixi
julia> trixi_include("examples/p4est_2d_dgsem/elixir_advection_basic.jl") with the current version (and the appropriate dev'd P4est.jl branch), I get the following error:
Any idea what could be wrong or where I might need to poke around, @krrutkow? To be honest, I have no clue where to even start... |
Good find! The automatic array-to-pointer conversion was only defined on a Vector, not AbstractArray. If you define this, does it work?
If so, I will add that to the next update to CBinding. |
This seems to be working, I added it to https://github.com/krrutkow/P4est.jl/tree/cbinding-v1 in krrutkow/P4est.jl@0a95340. Thanks! I'll continue fixing up Trixi until I run into the next inexplicable issue... |
OK, so one thing I can already report is that the REPL regularly keeps dying on me: either during errors, or when I rerun a previously failing and now hopefully fixed example, or just when I exit the REPL. The error messages usually look something like this
Any idea where this might come from? Can this related be to analytech-solutions/CBinding.jl#61? Or is this related to some finalizer funny business? |
OK, another weird issue: Directly using the macro version Trixi.jl/src/solvers/dgsem_p4est/containers_2d.jl Lines 53 to 54 in 6ab71e9
with error message (during using Trixi already!):
no method matching var"@c\"P4EST_MAXLEVEL\""(::LineNumberNode, ::Module, ::Expr)
Funnily, the following does work: Trixi.jl/src/solvers/dgsem_p4est/containers_2d.jl Lines 53 to 55 in 9589447
Any idea what's going on here @krrutkow? |
The macro parsing of Julia is probably grabbing everything after |
@sloede Regarding #835 (comment), I think the pointer being destroyed Currently pointers that are arguments to C functions are automatically converted, but perhaps only conversion to/from |
Can be closed after merging #1184? |
Superseded by #1184. |
This PR prepares Trixi for working with trixi-framework/P4est.jl#42 or trixi-framework/P4est.jl#43. To use it, you need to manually
dev
a local clone of said PRs, e.g., from within a clone of this Trixi branch, executejulia --project -e 'using Pkg; Pkg.develop("path/to/P4est.jl/clone/on/branch/cbinding-v1")'