Skip to content

GkoPreferences

GkoPreferences is a submodule of Ginkgo.jl. It provides several useful functions to check for important information about the underlying ginkgo_jll.jl and utilizes Preferences.jl package for overriding the default binaries used for Ginkgo.jl.

These choices are compile-time constants, any changes require a Julia restart.

Ginkgo.GkoPreferences.diagnostics Method
julia
diagnostics()

Checking if the artifact is avaliable for current platform. It returns false if best_wrapper === nothing

source
Ginkgo.GkoPreferences.locate Method
julia
locate()

Fetch locations of binaries being used by Ginkgo.jl

source
Ginkgo.GkoPreferences.preferences Method
julia
preferences()

Checking if paths to ginkgo binaries are overwritten in LocalPreferences.toml file.

source
Ginkgo.GkoPreferences.use_jll_binary! Method
julia
use_jll_binary!()

Change library paths used by Ginkgo.jl to artifacts provided by ginkgo_jll.jl.

Note

You will need to restart Julia to use the new library.

Warning

Due to a bug in Julia (until 1.6.5 and 1.7.1), setting preferences in transitive dependencies is broken (https://github.com/JuliaPackaging/Preferences.jl/issues/24). To fix this either update your version of Julia, or add ginkgo_jll as a direct dependency to your project.

source
Ginkgo.GkoPreferences.use_system_binary! Method
julia
use_system_binary!(libpath; force=true, debug=false)

Change library paths used by Ginkgo.jl to system binaries located at libpath.

The override keyword can be either:

  • force, See Preferences.set_preferences! for the force keyword.

  • debug, This argument needs to be set to true for using binaries built in debug mode

Note

You will need to restart Julia to use the new library.

Warning

Due to a bug in Julia (until 1.6.5 and 1.7.1), setting preferences in transitive dependencies is broken (https://github.com/JuliaPackaging/Preferences.jl/issues/24). To fix this either update your version of Julia, or add ginkgo_jll as a direct dependency to your project.

source