trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
541 stars 109 forks source link

Problem with local installation of `p4est` #1358

Open JoshuaLampert opened 1 year ago

JoshuaLampert commented 1 year ago

There is a problem with the elixir under examples/p4est_2d_dgsem/elixir_advection_nonconforming_flag.jl, when I run it with a custom installation of p4est. In order to tell P4est.jl to use the custom p4est installation (compiled with MPI) together with a custom MPI version I used the setup explained here resulting in a LocalPreferences.toml looking like

[MPIPreferences]
_format = "1.0"
abi = "OpenMPI"
binary = "system"
libmpi = "libmpi"
mpiexec = "mpiexec"

[P4est]
libp4est = "/home/jlampert/p4est-2.8/build/build-mpi/src/.libs/libp4est.so"

However, running

$ julia --project=@.
julia> include("examples/p4est_2d_dgsem/elixir_advection_nonconforming_flag.jl")

leads to the following error:

Abort: Assertion 'p4est_is_balanced (p4est, btype)'
Abort: ./../../src/p4est.c:2424
Abort
[...]

Any ideas, especially @sloede, @lchristm, @ranocha?

sloede commented 1 year ago

Hm. Have you tried setting libp4est manually to point to the libp4est.so delivered with P4est_jll.jl? Maybe it is an issue with your local build?

JoshuaLampert commented 1 year ago

If I set libp4est to the libp4est.so delivered with P4est_jll.jl in the LocalPreferences.toml I get the error

ERROR: LoadError: InitError: could not load library "/home/jlampert/.julia/artifacts/16363fca48e0da737994c3f9b3a7cbebb049a644/lib/libp4est.so"
libmpi.so.12: cannot open shared object file: No such file or directory

When I additionally remove the [MPIPreferences] section in the LocalPreferences.toml everything works. But using the local build I had the same error on two different devices (including roci), both running Linux.

sloede commented 1 year ago

Just came across this issue, is this still relevant?

JoshuaLampert commented 1 year ago

Yes, I am still getting this error when debug mode is enabled in the local p4est. Without debug mode (like in P4est_jll) everything runs fine. I don't know if this is a bug in p4est, a problem with the setup in the elixir or something else.