Skip to content

Make loading more robust #91

@ranocha

Description

@ranocha

As discussed with @JoshuaLampert and @sloede, it would be nice if we could make the loading infrastructure more user-friendly. Right now, the code

P4est.jl/src/LibP4est.jl

Lines 15 to 25 in 8202433

@static if _PREFERENCE_LIBP4EST == "P4est_jll"
const libp4est = P4est_jll.libp4est
else
const libp4est = _PREFERENCE_LIBP4EST
end
@static if _PREFERENCE_LIBSC == "P4est_jll"
const libsc = P4est_jll.libsc
else
const libsc = _PREFERENCE_LIBSC
end

will fail if we cannot load P4est_jll.libp4est while P4est.jl is configured to use the JLL (default). Thus, we must first set the P4est.jl preferences and afterwards the MPI preferences (see #90). Moreover, one must always set P4est.jl preferences when custom MPI preferences like these are set if P4est.jl is loaded - even if P4est.jl is not used at all.

It would be much nicer if we would just print a warning if we cannot load libp4est but allow using P4est. Ideally, this should also be done similarly with T8code.jl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions