Skip to content

Error message from @import_required_backends when CUDA.jl/MPI.jl are not available is unhelpful #88

@Sbozzolo

Description

@Sbozzolo

When calling @import_required_backends, the relevant backends have to be installed. When they are not, the error message is something like

ERROR: ArgumentError: Package CUDA not found in current path.
- Run `import Pkg; Pkg.add("CUDA")` to install the CUDA package.
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1772 [inlined]
 [2] macro expansion
   @ ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1753
 [4] #invoke_in_world#3
   @ ./essentials.jl:926 [inlined]
 [5] invoke_in_world
   @ ./essentials.jl:923 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1746
 [7] macro expansion
   @ ~/.julia/packages/ClimaComms/agO9C/src/loading.jl:51 [inlined]
 [8] top-level scope
   @ REPL[6]:1

This is not very user friendly and might leave people confused.

This is something that end users interact with directly, so it would be better to provide more informative errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions