xref: /libCEED/julia/LibCEED.jl/README.md (revision cbdd7b6826d97824c645fe5785def737caa196b5)
144554ea0SWill Pazner# LibCEED.jl: Julia Interface for [libCEED](https://github.com/CEED/libCEED)
244554ea0SWill Pazner
36f5dc8baSWill PaznerPlease see the [LibCEED.jl
46f5dc8baSWill Paznerdocumentation](http://ceed.exascaleproject.org/libCEED-julia-docs/dev/) for
56f5dc8baSWill Paznerusage and API documentation.
66f5dc8baSWill Pazner
744554ea0SWill Pazner## Installation
844554ea0SWill Pazner
96f5dc8baSWill PaznerThe LibCEED.jl package can be installed with Julia's package manager by running
106f5dc8baSWill Pazner`] add LibCEED`. This will automatically install a pre-built binary of the
116f5dc8baSWill PaznerlibCEED library. If you require features of a specific build of libCEED (e.g.
126f5dc8baSWill PaznerCUDA/GPU support, specific compiler flags, etc.) then you should compile your
136f5dc8baSWill Paznerown version of the libCEED library, and configure LibCEED.jl to use this binary
14*cbdd7b68SWill Pazneras described in the [Configuring LibCEED.jl](#configuring-libceedjl) section.
1544554ea0SWill Pazner
166f5dc8baSWill Pazner**Warning:** the pre-built libCEED binaries do not support CUDA backends
176f5dc8baSWill Pazner
186f5dc8baSWill PaznerThe pre-built binaries automatically installed by LibCEED.jl (through the
196f5dc8baSWill Pazner[libCEED_jll](https://juliahub.com/ui/Packages/libCEED_jll/LB2fn) package) are
206f5dc8baSWill Paznernot built with CUDA support. If you want to run libCEED on the GPU, you will
216f5dc8baSWill Paznerhave to build libCEED from source and configure LibCEED.jl as described in the
22*cbdd7b68SWill Pazner[Configuring LibCEED.jl](#configuring-libceedjl) section.
236f5dc8baSWill Pazner
246f5dc8baSWill Pazner### Configuring LibCEED.jl
256f5dc8baSWill Pazner
266f5dc8baSWill PaznerBy default, LibCEED.jl will use the pre-built libCEED binaries provided by the
276f5dc8baSWill Pazner[libCEED_jll](https://juliahub.com/ui/Packages/libCEED_jll/LB2fn) package. If
286f5dc8baSWill Pazneryou wish to use a different libCEED binary (e.g. one built from source),
296f5dc8baSWill PaznerLibCEED.jl can be configured using the `JULIA_LIBCEED_LIB` environment variable
306f5dc8baSWill Paznerset to the absolute path of the libCEED dynamic library. For the configuration
316f5dc8baSWill Paznerto take effect, LibCEED.jl must be **built** with this environment variable, for
326f5dc8baSWill Paznerexample:
336f5dc8baSWill Pazner
3444554ea0SWill Pazner```julia
3544554ea0SWill Pazner% JULIA_LIBCEED_LIB=/path/to/libceed.so julia
3644554ea0SWill Paznerjulia> # press ] to enter package manager
376f5dc8baSWill Pazner(env) pkg> build LibCEED
3844554ea0SWill Pazner```
3944554ea0SWill Pazneror, equivalently,
4044554ea0SWill Pazner```julia
4144554ea0SWill Paznerjulia> withenv("JULIA_LIBCEED_LIB" => "/path/to/libceed.so") do
426f5dc8baSWill Pazner    Pkg.build("LibCEED")
4344554ea0SWill Paznerend
4444554ea0SWill Pazner```
45