Skip to content

Commit

Permalink
add warning if p4est/t8code are not usable
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert committed Nov 20, 2023
1 parent 7a465a3 commit 1b02a77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/auxiliary/p4est.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ function init_p4est()

# Initialize `p4est` with log level ERROR to prevent a lot of output in AMR simulations
p4est_init(C_NULL, SC_LP_ERROR)
else
@warn "Preferences for P4est.jl are not set correctly. Until fixed, using `P4estMesh` will result in a crash. " *
"See also https://trixi-framework.github.io/Trixi.jl/stable/parallelization/#parallel_system_MPI"
end

return nothing
Expand Down
3 changes: 3 additions & 0 deletions src/auxiliary/t8code.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ function init_t8code()
@warn "T8code.jl: sc_finalize will be called during shutdown of Trixi.jl."
MPI.add_finalize_hook!(T8code.Libt8.sc_finalize)
end
else
@warn "Preferences for T8code.jl are not set correctly. Until fixed, using `T8codeMesh` will result in a crash. " *
"See also https://trixi-framework.github.io/Trixi.jl/stable/parallelization/#parallel_system_MPI"
end

return nothing
Expand Down

0 comments on commit 1b02a77

Please sign in to comment.