Skip to content

Commit

Permalink
Load an LP64 backend for the new version of Clp_jll.jl (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison authored Jul 24, 2024
1 parent 01f0d01 commit cde85a1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
- version: '1.6'
os: ubuntu-latest
arch: x86
# Test against Apple M-series
# - version: '1'
# os: macos-14
# arch: aarch64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
6 changes: 5 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ version = "1.0.3"

[deps]
Clp_jll = "06985876-5285-5a41-9fcb-8948a742cc53"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2"

[compat]
Clp_jll = "=100.1700.601, =100.1700.700"
Clp_jll = "=100.1700.601, =100.1700.700, =100.1700.900"
LinearAlgebra = "1.6"
MathOptInterface = "1.1"
OpenBLAS32_jll = "0.3.10"
julia = "1.6"

[extras]
Expand Down
11 changes: 10 additions & 1 deletion src/Clp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
module Clp

import Clp_jll
import LinearAlgebra
import MathOptInterface as MOI
import OpenBLAS32_jll

function __init__()
if VERSION >= v"1.9"
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
global libClp = Clp_jll.libClp
version = VersionNumber(
"$(Clp_VersionMajor()).$(Clp_VersionMinor()).$(Clp_VersionRelease())",
)
if !(v"1.17.2" <= version <= v"1.17.7")
if !(v"1.17.2" <= version <= v"1.17.9")
error(
"You have installed version $version of Clp, which is not " *
"supported by Clp.jl. If the version change was breaking, changes " *
Expand Down
4 changes: 0 additions & 4 deletions src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# Use of this source code is governed by an MIT-style license that can be found
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.

import MathOptInterface

const MOI = MathOptInterface

MOI.Utilities.@product_of_sets(
_LPProductOfSets,
MOI.EqualTo{T},
Expand Down

0 comments on commit cde85a1

Please sign in to comment.