-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for sparse-direct-mkl-pardiso solver (#255)
* define scs_version for each solver, independently * add MKLDirectSolver based on SCS_MKL_jll * bump to 1.1.2 * hide MKLDirectSolver behind @require * remove dlopen magic opening libmkl_gnu_thread * only import SCS_MKL on linux SCS_MKL_jll is build only for linux platforms, but MKL_jll is also available on Windows/Macos causing warnings on these platforms. * bring SCS_*_jlls to 3.2.1 * bump to 1.1.3 * load SCS_MKL_jll only on x86_64-linux * add copyright notice to mkl_direct.jl * add section on Linear solvers to README
- Loading branch information
Marek Kaluba
authored
Nov 2, 2022
1 parent
762b65f
commit 85d87ea
Showing
9 changed files
with
171 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright (c) 2022: SCS.jl contributors | ||
# | ||
# 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. | ||
|
||
struct MKLDirectSolver <: LinearSolver end | ||
|
||
scsint_t(::Type{MKLDirectSolver}) = Clonglong | ||
|
||
function scs_set_default_settings( | ||
::Type{MKLDirectSolver}, | ||
stgs::ScsSettings{I}, | ||
) where {I<:Clonglong} | ||
return @ccall( | ||
mkldirect.scs_set_default_settings(stgs::Ref{ScsSettings{I}})::Cvoid, | ||
) | ||
end | ||
|
||
function scs_init( | ||
::Type{MKLDirectSolver}, | ||
data::ScsData{I}, | ||
cone::ScsCone{I}, | ||
stgs::ScsSettings{I}, | ||
) where {I<:Clonglong} | ||
return @ccall mkldirect.scs_init( | ||
data::Ref{ScsData{I}}, | ||
cone::Ref{ScsCone{I}}, | ||
stgs::Ref{ScsSettings{I}}, | ||
)::Ptr{Cvoid} | ||
end | ||
|
||
function scs_update( | ||
::Type{MKLDirectSolver}, | ||
work::Ptr{Cvoid}, | ||
b::Vector{Float64}, | ||
c::Vector{Float64}, | ||
) | ||
return @ccall mkldirect.scs_update( | ||
work::Ptr{Cvoid}, | ||
b::Ref{Float64}, | ||
c::Ref{Float64}, | ||
)::Clonglong | ||
end | ||
|
||
function scs_solve( | ||
::Type{MKLDirectSolver}, | ||
work::Ptr{Cvoid}, | ||
solution::ScsSolution, | ||
info::ScsInfo{I}, | ||
warm_start::Integer, | ||
) where {I<:Clonglong} | ||
return @ccall mkldirect.scs_solve( | ||
work::Ptr{Cvoid}, | ||
solution::Ref{ScsSolution}, | ||
info::Ref{ScsInfo{I}}, | ||
warm_start::Clonglong, | ||
)::Clonglong | ||
end | ||
|
||
function scs_finish(::Type{MKLDirectSolver}, work::Ptr{Cvoid}) | ||
return @ccall mkldirect.scs_finish(work::Ptr{Cvoid})::Cvoid | ||
end | ||
|
||
function scs_version(::Type{MKLDirectSolver}) | ||
return unsafe_string(@ccall mkldirect.scs_version()::Cstring) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85d87ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
85d87ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/71489
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: