xref: /libCEED/julia/LibCEED.jl/README.md (revision eca1b09c0d8fadadd2907b292376e77d2d4d9943)
144554ea0SWill Pazner# LibCEED.jl: Julia Interface for [libCEED](https://github.com/CEED/libCEED)
244554ea0SWill Pazner
3*17be3a41SJeremy L ThompsonPlease see the [LibCEED.jl documentation](http://ceed.exascaleproject.org/libCEED-julia-docs/dev/) for usage and API documentation.
46f5dc8baSWill Pazner
544554ea0SWill Pazner## Installation
644554ea0SWill Pazner
7*17be3a41SJeremy L ThompsonThe LibCEED.jl package can be installed with Julia's package manager by running `] add LibCEED`.
8*17be3a41SJeremy L ThompsonThis will automatically install a pre-built binary of the libCEED library.
9*17be3a41SJeremy L ThompsonIf you require features of a specific build of libCEED (e.g. CUDA/GPU support, specific compiler flags, etc.) then you should compile your own version of the libCEED library, and configure LibCEED.jl to use this binary as described in the [Configuring LibCEED.jl](#configuring-libceedjl) section.
1044554ea0SWill Pazner
116f5dc8baSWill Pazner**Warning:** the pre-built libCEED binaries do not support CUDA backends
126f5dc8baSWill Pazner
13*17be3a41SJeremy L ThompsonThe pre-built binaries automatically installed by LibCEED.jl (through the [libCEED_jll](https://juliahub.com/ui/Packages/libCEED_jll/LB2fn) package) are not built with CUDA support.
14*17be3a41SJeremy L ThompsonIf you want to run libCEED on the GPU, you will have to build libCEED from source and configure LibCEED.jl as described in the [Configuring LibCEED.jl](#configuring-libceedjl) section.
156f5dc8baSWill Pazner
166f5dc8baSWill Pazner### Configuring LibCEED.jl
176f5dc8baSWill Pazner
18*17be3a41SJeremy L ThompsonBy default, LibCEED.jl will use the pre-built libCEED binaries provided by the [libCEED_jll](https://juliahub.com/ui/Packages/libCEED_jll/LB2fn) package.
19*17be3a41SJeremy L ThompsonIf you wish to use a different libCEED binary (e.g. one built from source), LibCEED.jl can be configured using Julia's _preferences_ mechanism.
20*17be3a41SJeremy L ThompsonNote that this preference will be set for the currently active Julia environment, and can be different between different environments.
21*17be3a41SJeremy L ThompsonThe Julia session must be restarted for changes to take effect.
226f5dc8baSWill Pazner
2344554ea0SWill Pazner```julia
24186a1480SWill Paznerjulia> using LibCEED
25186a1480SWill Paznerjulia> set_libceed_path!("/path/to/libceed.so")
26186a1480SWill Pazner[ Info: Setting the libCEED library path to /path/to/libceed.so.
27186a1480SWill Pazner[ Info: Restart the Julia session for changes to take effect.
2844554ea0SWill Pazner```
29186a1480SWill Pazner
30*17be3a41SJeremy L ThompsonSee [Preferences.jl](https://github.com/JuliaPackaging/Preferences.jl) for more information.
31