xref: /libCEED/julia/LibCEED.jl/README.md (revision ec3da8bcb94d9f0073544b37b5081a06981a86f7)
1# LibCEED.jl: Julia Interface for [libCEED](https://github.com/CEED/libCEED)
2
3Please see the [LibCEED.jl
4documentation](http://ceed.exascaleproject.org/libCEED-julia-docs/dev/) for
5usage and API documentation.
6
7## Installation
8
9The LibCEED.jl package can be installed with Julia's package manager by running
10`] add LibCEED`. This will automatically install a pre-built binary of the
11libCEED library. If you require features of a specific build of libCEED (e.g.
12CUDA/GPU support, specific compiler flags, etc.) then you should compile your
13own version of the libCEED library, and configure LibCEED.jl to use this binary
14as described in the [Configuring LibCEED.jl](@ref) section.
15
16**Warning:** the pre-built libCEED binaries do not support CUDA backends
17
18The pre-built binaries automatically installed by LibCEED.jl (through the
19[libCEED_jll](https://juliahub.com/ui/Packages/libCEED_jll/LB2fn) package) are
20not built with CUDA support. If you want to run libCEED on the GPU, you will
21have to build libCEED from source and configure LibCEED.jl as described in the
22[Configuring LibCEED.jl](@ref) section.
23
24### Configuring LibCEED.jl
25
26By default, LibCEED.jl will use the pre-built libCEED binaries provided by the
27[libCEED_jll](https://juliahub.com/ui/Packages/libCEED_jll/LB2fn) package. If
28you wish to use a different libCEED binary (e.g. one built from source),
29LibCEED.jl can be configured using the `JULIA_LIBCEED_LIB` environment variable
30set to the absolute path of the libCEED dynamic library. For the configuration
31to take effect, LibCEED.jl must be **built** with this environment variable, for
32example:
33
34```julia
35% JULIA_LIBCEED_LIB=/path/to/libceed.so julia
36julia> # press ] to enter package manager
37(env) pkg> build LibCEED
38```
39or, equivalently,
40```julia
41julia> withenv("JULIA_LIBCEED_LIB" => "/path/to/libceed.so") do
42    Pkg.build("LibCEED")
43end
44```
45