Skip to content

Commit

Permalink
Add OpenBLAS32_jll as a dependency of GALAHAD.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Feb 12, 2024
1 parent 0a07832 commit fe09a21
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GALAHAD.jl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ version = "0.1.0"
[deps]
GALAHAD_jll = "1621ace8-c1f0-5e32-a05d-ca786afa56c2"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2"

[compat]
julia = "1.9"

[extras]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"

[targets]
test = ["Test", "Printf", "Accessors"]
10 changes: 10 additions & 0 deletions GALAHAD.jl/src/GALAHAD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ if haskey(ENV, "JULIA_GALAHAD_LIBRARY_PATH")
const libgalahad_double = joinpath(ENV["JULIA_GALAHAD_LIBRARY_PATH"], "libgalahad_double.$dlext")
const GALAHAD_INSTALLATION = "CUSTOM"
else
using OpenBLAS32_jll
using GALAHAD_jll
const GALAHAD_INSTALLATION = "YGGDRASIL"
end

function __init__()
if GALAHAD_INSTALLATION == "YGGDRASIL"
config = LinearAlgebra.BLAS.lbt_get_config()
if !any(lib -> lib.interface == :lp64, config.loaded_libs)
LinearAlgebra.BLAS.lbt_forward(OpenBLAS32_jll.libopenblas_path)
end
end
end

# Utils.
include("utils.jl")

Expand Down

0 comments on commit fe09a21

Please sign in to comment.