Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reexport MadNLP from MadNLP/libs #325

Merged
merged 4 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ model = Model(()->MadNLP.Optimizer(linear_solver=LapackCPUSolver))
#### HSL (requires extension `MadNLPHSL`)

```julia
using MadNLP, MadNLPHSL, JuMP
using MadNLPHSL, JuMP
# ...
model = Model(()->MadNLP.Optimizer(linear_solver=Ma27Solver))
model = Model(()->MadNLP.Optimizer(linear_solver=Ma57Solver))
Expand All @@ -96,15 +96,15 @@ model = Model(()->MadNLP.Optimizer(linear_solver=Ma97Solver))
#### Mumps (requires extension `MadNLPMumps`)

```julia
using MadNLP, MadNLPMumps, JuMP
using MadNLPMumps, JuMP
# ...
model = Model(()->MadNLP.Optimizer(linear_solver=MumpsSolver))
```

#### Pardiso (requires extension `MadNLPPardiso`)

```julia
using MadNLP, MadNLPPardiso, JuMP
using MadNLPPardiso, JuMP
# ...
model = Model(()->MadNLP.Optimizer(linear_solver=PardisoSolver))
model = Model(()->MadNLP.Optimizer(linear_solver=PardisoMKLSolver))
Expand All @@ -113,7 +113,7 @@ model = Model(()->MadNLP.Optimizer(linear_solver=PardisoMKLSolver))
#### CUDA (requires extension `MadNLPGPU`)

```julia
using MadNLP, MadNLPGPU, JuMP
using MadNLPGPU, JuMP
# ...
model = Model(()->MadNLP.Optimizer(linear_solver=LapackGPUSolver)) # for dense problems
model = Model(()->MadNLP.Optimizer(linear_solver=CUDSSSolver)) # for sparse problems
Expand Down
8 changes: 8 additions & 0 deletions lib/MadNLPGPU/src/MadNLPGPU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,12 @@ end

export LapackGPUSolver

# re-export MadNLP, including deprecated names
for name in names(MadNLP, all=true)
if Base.isexported(MadNLP, name)
@eval using MadNLP: $(name)
@eval export $(name)
end
end

end # module
10 changes: 9 additions & 1 deletion lib/MadNLPHSL/src/MadNLPHSL.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module MadNLPHSL

import MadNLP: @kwdef, MadNLPLogger, @debug, @warn, @error,
import MadNLP: MadNLP, @kwdef, MadNLPLogger, @debug, @warn, @error,
AbstractOptions, AbstractLinearSolver, set_options!, SparseMatrixCSC, SubVector,
SymbolicException,FactorizationException,SolveException,InertiaException,
introduce, factorize!, solve!, improve!, is_inertia, inertia, findIJ, nnz,
Expand All @@ -21,4 +21,12 @@ include("ma97.jl")

export Ma27Solver, Ma57Solver, Ma77Solver, Ma86Solver, Ma97Solver

# re-export MadNLP, including deprecated names
for name in names(MadNLP, all=true)
if Base.isexported(MadNLP, name)
@eval using MadNLP: $(name)
@eval export $(name)
end
end

end # module
10 changes: 9 additions & 1 deletion lib/MadNLPMumps/src/MadNLPMumps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module MadNLPMumps
import StaticArrays: SVector, setindex
import MUMPS_seq_jll
import MadNLP:
parsefile, dlopen,
MadNLP, parsefile, dlopen,
@kwdef, MadNLPLogger, @debug, @warn, @error,
SparseMatrixCSC, SubVector,
SymbolicException,FactorizationException,SolveException,InertiaException,
Expand Down Expand Up @@ -286,4 +286,12 @@ is_supported(::Type{MumpsSolver},::Type{Float64}) = true

export MumpsSolver

# re-export MadNLP, including deprecated names
for name in names(MadNLP, all=true)
if Base.isexported(MadNLP, name)
@eval using MadNLP: $(name)
@eval export $(name)
end
end

end # module
8 changes: 8 additions & 0 deletions lib/MadNLPPardiso/src/MadNLPPardiso.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ end

export PardisoSolver, PardisoMKLSolver

# re-export MadNLP, including deprecated names
for name in names(MadNLP, all=true)
if Base.isexported(MadNLP, name)
@eval using MadNLP: $(name)
@eval export $(name)
end
end

end # module
Loading